| java.lang.Object org.bouncycastle.crypto.signers.ISO9796d2PSSSigner
ISO9796d2PSSSigner | public class ISO9796d2PSSSigner implements SignerWithRecovery(Code) | | ISO9796-2 - mechanism using a hash function with recovery (scheme 2 and 3).
Note: the usual length for the salt is the length of the hash
function used in bytes.
|
Method Summary | |
public byte[] | generateSignature() generate a signature for the loaded message using the key we were
initialised with. | public byte[] | getRecoveredMessage() Return a reference to the recoveredMessage message. | public boolean | hasFullMessage() Return true if the full message was recoveredMessage. | public void | init(boolean forSigning, CipherParameters param) Initialise the signer.
Parameters: forSigning - true if for signing, false if for verification. Parameters: param - parameters for signature generation/verification. | public void | reset() | public void | update(byte b) | public void | update(byte[] in, int off, int len) | public boolean | verifySignature(byte[] signature) return true if the signature represents a ISO9796-2 signature
for the passed in message. |
TRAILER_IMPLICIT | final public static int TRAILER_IMPLICIT(Code) | | |
TRAILER_RIPEMD128 | final public static int TRAILER_RIPEMD128(Code) | | |
TRAILER_RIPEMD160 | final public static int TRAILER_RIPEMD160(Code) | | |
TRAILER_SHA1 | final public static int TRAILER_SHA1(Code) | | |
ISO9796d2PSSSigner | public ISO9796d2PSSSigner(AsymmetricBlockCipher cipher, Digest digest, int saltLength, boolean implicit)(Code) | | Generate a signer for the with either implicit or explicit trailers
for ISO9796-2, scheme 2 or 3.
Parameters: cipher - base cipher to use for signature creation/verification Parameters: digest - digest to use. Parameters: saltLength - length of salt in bytes. Parameters: implicit - whether or not the trailer is implicit or gives the hash. |
ISO9796d2PSSSigner | public ISO9796d2PSSSigner(AsymmetricBlockCipher cipher, Digest digest, int saltLength)(Code) | | Constructor for a signer with an explicit digest trailer.
Parameters: cipher - cipher to use. Parameters: digest - digest to sign with. Parameters: saltLength - length of salt in bytes. |
generateSignature | public byte[] generateSignature() throws CryptoException(Code) | | generate a signature for the loaded message using the key we were
initialised with.
|
init | public void init(boolean forSigning, CipherParameters param)(Code) | | Initialise the signer.
Parameters: forSigning - true if for signing, false if for verification. Parameters: param - parameters for signature generation/verification. If theparameters are for generation they should be a ParametersWithRandom,a ParametersWithSalt, or just an RSAKeyParameters object. If RSAKeyParametersare passed in a SecureRandom will be created. exception: IllegalArgumentException - if wrong parameter type or a fixed salt is passed in which is the wrong length. |
reset | public void reset()(Code) | | reset the internal state
|
update | public void update(byte b)(Code) | | update the internal digest with the byte b
|
update | public void update(byte[] in, int off, int len)(Code) | | update the internal digest with the byte array in
|
verifySignature | public boolean verifySignature(byte[] signature)(Code) | | return true if the signature represents a ISO9796-2 signature
for the passed in message.
|
|
|