C# Class Org.BouncyCastle.Crypto.Signers.Iso9796d2Signer

ISO9796-2 - mechanism using a hash function with recovery (scheme 1)
Inheritance: ISignerWithRecovery
ファイルを表示 Open project: red-gate/iTextSharp-4.1.6 Class Usage Examples

Public Methods

Method Description
BlockUpdate ( byte input, int inOff, int length ) : void

update the internal digest with the byte array in

GenerateSignature ( ) : byte[]

Generate a signature for the loaded message using the key we were initialised with.

GetRecoveredMessage ( ) : byte[]

Return a reference to the recoveredMessage message.

HasFullMessage ( ) : bool

Return true if the full message was recoveredMessage.

Init ( bool forSigning, ICipherParameters parameters ) : void
Iso9796d2Signer ( IAsymmetricBlockCipher cipher, IDigest digest ) : System

Constructor for a signer with an explicit digest trailer.

Iso9796d2Signer ( IAsymmetricBlockCipher cipher, IDigest digest, bool isImplicit ) : System

Generate a signer for the with either implicit or explicit trailers for ISO9796-2.

Reset ( ) : void

reset the internal state

Update ( byte input ) : void

update the internal digest with the byte b

VerifySignature ( byte signature ) : bool

return true if the signature represents a ISO9796-2 signature for the passed in message.

Private Methods

Method Description
ClearBlock ( byte block ) : void

clear possible sensitive data

IsSameAs ( byte a, byte b ) : bool

compare two byte arrays.

Method Details

BlockUpdate() public method

update the internal digest with the byte array in
public BlockUpdate ( byte input, int inOff, int length ) : void
input byte
inOff int
length int
return void

GenerateSignature() public method

Generate a signature for the loaded message using the key we were initialised with.
public GenerateSignature ( ) : byte[]
return byte[]

GetRecoveredMessage() public method

Return a reference to the recoveredMessage message.
public GetRecoveredMessage ( ) : byte[]
return byte[]

HasFullMessage() public method

Return true if the full message was recoveredMessage.
public HasFullMessage ( ) : bool
return bool

Init() public method

public Init ( bool forSigning, ICipherParameters parameters ) : void
forSigning bool
parameters ICipherParameters
return void

Iso9796d2Signer() public method

Constructor for a signer with an explicit digest trailer.
public Iso9796d2Signer ( IAsymmetricBlockCipher cipher, IDigest digest ) : System
cipher IAsymmetricBlockCipher cipher to use. ///
digest IDigest digest to sign with. ///
return System

Iso9796d2Signer() public method

Generate a signer for the with either implicit or explicit trailers for ISO9796-2.
public Iso9796d2Signer ( IAsymmetricBlockCipher cipher, IDigest digest, bool isImplicit ) : System
cipher IAsymmetricBlockCipher base cipher to use for signature creation/verification
digest IDigest digest to use.
isImplicit bool whether or not the trailer is implicit or gives the hash.
return System

Reset() public method

reset the internal state
public Reset ( ) : void
return void

Update() public method

update the internal digest with the byte b
public Update ( byte input ) : void
input byte
return void

VerifySignature() public method

return true if the signature represents a ISO9796-2 signature for the passed in message.
public VerifySignature ( byte signature ) : bool
signature byte
return bool