C# Class NetSparkle.NetSparkleDSAVerificator

Class to verify a DSA signature
Afficher le fichier Open project: Deadpikle/NetSparkle Class Usage Examples

Méthodes publiques

Méthode Description
NetSparkleDSAVerificator ( SecurityMode mode, String publicKey = null, String publicKeyFile = "NetSparkle_DSA.pub" ) : System

Constructor

PublicKeyExists ( ) : System.Boolean

Determines if a public key exists

SignatureNeeded ( ) : bool

Returns if we need an signature

VerifyDSASignature ( String signature, Stream stream ) : ValidationResult

Verifies the DSA signature

VerifyDSASignatureFile ( String signature, String binaryPath ) : ValidationResult

Verifies the DSA signature

VerifyDSASignatureOfString ( String signature, String data ) : ValidationResult

Verifies the DSA signature of string data

Private Methods

Méthode Description
CheckSecurityMode ( String signature, ValidationResult &result ) : System.Boolean
TryGetFileResource ( String publicKey, Stream data ) : Stream

Gets a file resource

TryGetResourceStream ( String publicKey ) : Stream

Get a resource stream

Method Details

NetSparkleDSAVerificator() public méthode

Constructor
public NetSparkleDSAVerificator ( SecurityMode mode, String publicKey = null, String publicKeyFile = "NetSparkle_DSA.pub" ) : System
mode SecurityMode The security mode of the validator. Control what parts has to be exist
publicKey String the public key as string (will be prefered before the file)
publicKeyFile String the public key file
Résultat System

PublicKeyExists() public méthode

Determines if a public key exists
public PublicKeyExists ( ) : System.Boolean
Résultat System.Boolean

SignatureNeeded() public méthode

Returns if we need an signature
public SignatureNeeded ( ) : bool
Résultat bool

VerifyDSASignature() public méthode

Verifies the DSA signature
public VerifyDSASignature ( String signature, Stream stream ) : ValidationResult
signature String expected signature
stream Stream the stream of the binary
Résultat ValidationResult

VerifyDSASignatureFile() public méthode

Verifies the DSA signature
public VerifyDSASignatureFile ( String signature, String binaryPath ) : ValidationResult
signature String expected signature
binaryPath String the path to the binary
Résultat ValidationResult

VerifyDSASignatureOfString() public méthode

Verifies the DSA signature of string data
public VerifyDSASignatureOfString ( String signature, String data ) : ValidationResult
signature String expected signature
data String the data
Résultat ValidationResult