public abstract class AbstractSignature extends java.lang.Object implements Signature
Signature
that implements common functionality.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
algorithm |
protected java.security.Signature |
signature |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSignature(java.lang.String algorithm) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
extractSig(byte[] sig) |
void |
init(java.security.PublicKey publicKey,
java.security.PrivateKey privateKey)
Initialize this signature with the given public key and private key.
|
byte[] |
sign()
Compute the signature.
|
void |
update(byte[] foo)
Convenience method, same as calling
Signature.update(byte[], int, int) with offset as 0 and H.length . |
void |
update(byte[] foo,
int off,
int len)
Update the computed signature with the given data.
|
protected final java.lang.String algorithm
protected java.security.Signature signature
public void init(java.security.PublicKey publicKey, java.security.PrivateKey privateKey)
Signature
public void update(byte[] foo)
Signature
Signature.update(byte[], int, int)
with offset as 0
and H.length
.public void update(byte[] foo, int off, int len)
Signature
public byte[] sign()
Signature
protected byte[] extractSig(byte[] sig)