Modifier and Type | Field and Description |
---|---|
private AlgorithmIdentifier |
algId |
private Digest |
digest |
private boolean |
forSigning |
private static java.util.Hashtable |
oidMap |
private AsymmetricBlockCipher |
rsaEngine |
Constructor and Description |
---|
RSADigestSigner(Digest digest) |
Modifier and Type | Method and Description |
---|---|
private byte[] |
derEncode(byte[] hash) |
byte[] |
generateSignature()
Generate a signature for the message we've been loaded with using the key
we were initialised with.
|
java.lang.String |
getAlgorithmName()
Deprecated.
|
void |
init(boolean forSigning,
CipherParameters parameters)
initialise the signer for signing or verification.
|
void |
reset()
reset the internal state
|
void |
update(byte input)
update the internal digest with the byte b
|
void |
update(byte[] input,
int inOff,
int length)
update the internal digest with the byte array in
|
boolean |
verifySignature(byte[] signature)
return true if the internal state represents the signature described in
the passed in array.
|
private final AsymmetricBlockCipher rsaEngine
private final AlgorithmIdentifier algId
private final Digest digest
private boolean forSigning
private static final java.util.Hashtable oidMap
public RSADigestSigner(Digest digest)
public java.lang.String getAlgorithmName()
public void init(boolean forSigning, CipherParameters parameters)
public void update(byte input)
public void update(byte[] input, int inOff, int length)
public byte[] generateSignature() throws CryptoException, DataLengthException
generateSignature
in interface Signer
CryptoException
DataLengthException
public boolean verifySignature(byte[] signature)
verifySignature
in interface Signer
public void reset()
Signer
private byte[] derEncode(byte[] hash) throws java.io.IOException
java.io.IOException