be.SIRAPRISE.client
Interface Signer
- All Known Implementing Classes:
- DBObjectInterfaceGenerator, ProcessScript, UserPrivateKeyProvider
public interface Signer
Signers are used by clients in two circumstances :
- The client needs to establish a connection to a server and wants to authenticate itself
- The client needs to start a transaction for a non-anonymous user and wants/needs to authenticate the user identity by computing a signature
- Author:
- Erwin Smout
Method Summary |
byte[] |
sign(java.security.Signature signature,
byte[] signMessage)
Computes the signature for the given byte string and the given Signature. |
sign
byte[] sign(java.security.Signature signature,
byte[] signMessage)
throws java.security.InvalidKeyException,
java.security.SignatureException,
NotFoundException
- Computes the signature for the given byte string and the given Signature. Normally, this involves three method invocations on the given Signature object :
- initSign() the Signature with a PrivateKey object which is to be obtained from private resources
- update() the Signature with the given byte string
- sign() to compute the signature bytes
- Parameters:
signature
- The Signature object to be used for computing the signature.signMessage
- The message to be signed.
- Returns:
- the computed signature
- Throws:
java.security.InvalidKeyException
- If the private key found for signing with this Signature, turns out to be invalid
java.security.SignatureException
- If any problem occurred during computation of the signature
NotFoundException
- If no private key could be found for signing with this Signature