public class DigitalSignature extends Object
Constructor and Description |
---|
DigitalSignature(String authType)
Create Signature type
|
Modifier and Type | Method and Description |
---|---|
void |
init(Certificate cert)
Initiate Signature type by certificate
|
void |
init(PrivateKey key)
Initiate Signature type by private key
|
void |
setMD5(byte[] data)
Sets MD5 hash
|
void |
setSHA(byte[] data)
Sets SHA hash
|
byte[] |
sign()
Sign hash
|
void |
update(byte[] data)
Update Signature hash
|
boolean |
verifySignature(byte[] data)
Verifies the signature data.
|
public DigitalSignature(String authType)
keyExchange
- public void init(PrivateKey key)
key
- public void init(Certificate cert)
cert
- public void update(byte[] data)
data
- public void setMD5(byte[] data)
data
- public void setSHA(byte[] data)
data
- public byte[] sign()
public boolean verifySignature(byte[] data)
data
- - the signature bytes