public abstract class SignatureProxy
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SHA1 |
static java.lang.String |
SHA256 |
static java.lang.String |
SHA384 |
static java.lang.String |
SHA512 |
| Constructor and Description |
|---|
SignatureProxy(java.security.PublicKey publicKey)
Instantiates a new SignatureProxy which needs a public key for the
later authentication process.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.PublicKey |
getPublicKey() |
abstract byte[] |
sign(byte[] message,
java.lang.String hashAlgorithm)
This method should sign a given byte array message using the private key.
|
public static final java.lang.String SHA1
public static final java.lang.String SHA256
public static final java.lang.String SHA384
public static final java.lang.String SHA512
public SignatureProxy(java.security.PublicKey publicKey)
publicKey - The public key.java.lang.IllegalArgumentException - Might be thrown id the public key is invalid.public abstract byte[] sign(byte[] message,
java.lang.String hashAlgorithm)
throws java.io.IOException
message - The message which should be signed.hashAlgorithm - The hashing algorithm which should be used.java.io.IOException - This exception might be thrown during the signing process.public java.security.PublicKey getPublicKey()