Google

Bouncy Castle Cryptography 1.11 API Specification: Class ISO9796d2Signer
Bouncy Castle Cryptography 1.11

org.bouncycastle.crypto.signers
Class ISO9796d2Signer

java.lang.Object
  |
  +--org.bouncycastle.crypto.signers.ISO9796d2Signer

public class ISO9796d2Signer
extends java.lang.Object

ISO9796-2 - mechanism using a hash function.


Field Summary
static int TRAILER_IMPLICIT
           
static int TRAILER_RIPEMD128
           
static int TRAILER_RIPEMD160
           
static int TRAILER_SHA1
           
 
Constructor Summary
ISO9796d2Signer(AsymmetricBlockCipher cipher, Digest digest)
           
ISO9796d2Signer(AsymmetricBlockCipher cipher, Digest digest, boolean implicit)
           
 
Method Summary
 byte[] generateSignature(byte[] message)
          generate a signature for the given message using the key we were initialised with.
 void init(boolean forSigning, CipherParameters param)
           
 boolean verifySignature(byte[] message, byte[] signature)
          return true if the signature represents a ISO9796-2 signature for the passed in message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRAILER_IMPLICIT

public static final int TRAILER_IMPLICIT

TRAILER_RIPEMD160

public static final int TRAILER_RIPEMD160

TRAILER_RIPEMD128

public static final int TRAILER_RIPEMD128

TRAILER_SHA1

public static final int TRAILER_SHA1
Constructor Detail

ISO9796d2Signer

public ISO9796d2Signer(AsymmetricBlockCipher cipher,
                       Digest digest,
                       boolean implicit)

ISO9796d2Signer

public ISO9796d2Signer(AsymmetricBlockCipher cipher,
                       Digest digest)
Method Detail

init

public void init(boolean forSigning,
                 CipherParameters param)

generateSignature

public byte[] generateSignature(byte[] message)
                         throws CryptoException
generate a signature for the given message using the key we were initialised with.
Parameters:
message - the message that will be verified later.

verifySignature

public boolean verifySignature(byte[] message,
                               byte[] signature)
return true if the signature represents a ISO9796-2 signature for the passed in message.

Bouncy Castle Cryptography 1.11