C# Class BaseCipherSuitePlugin.SignatureAlgorithmDSA

Inheritance: SignatureAlgorithm
Show file Open project: juhovh/AaltoTLS Class Usage Examples

Public Methods

Method Description
ImportPrivateKey ( byte keyData ) : AaltoTLS.PluginInterface.CertificatePrivateKey
SignData ( ProtocolVersion version, byte data, HashAlgorithm hashAlgorithm, AaltoTLS.PluginInterface.CertificatePrivateKey privateKey ) : byte[]
SupportsHashAlgorithmType ( byte hashAlgorithm ) : bool
SupportsProtocolVersion ( ProtocolVersion version ) : bool
VerifyData ( ProtocolVersion version, byte data, HashAlgorithm hashAlgorithm, CertificatePublicKey publicKey, byte signature ) : bool
VerifyData ( byte buffer, DSACryptoServiceProvider dsaKey, byte signature ) : bool

Private Methods

Method Description
DERDecodeSignature ( byte data ) : byte[]
DERDecodeVector ( byte input, int idx, int &consumed ) : byte[]
DEREncodeSignature ( byte signature ) : byte[]
DEREncodeVector ( byte vector, int idx1, int length, byte output, int idx2 ) : void

Method Details

ImportPrivateKey() public method

public ImportPrivateKey ( byte keyData ) : AaltoTLS.PluginInterface.CertificatePrivateKey
keyData byte
return AaltoTLS.PluginInterface.CertificatePrivateKey

SignData() public method

public SignData ( ProtocolVersion version, byte data, HashAlgorithm hashAlgorithm, AaltoTLS.PluginInterface.CertificatePrivateKey privateKey ) : byte[]
version AaltoTLS.PluginInterface.ProtocolVersion
data byte
hashAlgorithm System.Security.Cryptography.HashAlgorithm
privateKey AaltoTLS.PluginInterface.CertificatePrivateKey
return byte[]

SupportsHashAlgorithmType() public method

public SupportsHashAlgorithmType ( byte hashAlgorithm ) : bool
hashAlgorithm byte
return bool

SupportsProtocolVersion() public method

public SupportsProtocolVersion ( ProtocolVersion version ) : bool
version AaltoTLS.PluginInterface.ProtocolVersion
return bool

VerifyData() public method

public VerifyData ( ProtocolVersion version, byte data, HashAlgorithm hashAlgorithm, CertificatePublicKey publicKey, byte signature ) : bool
version AaltoTLS.PluginInterface.ProtocolVersion
data byte
hashAlgorithm System.Security.Cryptography.HashAlgorithm
publicKey CertificatePublicKey
signature byte
return bool

VerifyData() public method

public VerifyData ( byte buffer, DSACryptoServiceProvider dsaKey, byte signature ) : bool
buffer byte
dsaKey System.Security.Cryptography.DSACryptoServiceProvider
signature byte
return bool