|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMySignature
This interface represents a signature algorithm.
Method Summary | |
---|---|
byte[] |
decodeForXMLSignature(byte[] a_encodedSignature)
Tries to decode a signature in a way as it would meet the W3C standard for XML signature values. |
byte[] |
encodeForXMLSignature(byte[] a_signature)
Encodes a signature in a way it meets the W3C standard for XML signature values. |
java.lang.String |
getXMLSignatureAlgorithmReference()
Returns a description of the the signature algorithm for XML signatures as defined in http://www.w3.org/TR/xmldsig-core/#sec-AlgID. |
void |
initSign(IMyPrivateKey a_privateKey)
Initialises the algorithm for signing. |
void |
initVerify(IMyPublicKey a_publicKey)
Initialises the algorithm for verifying. |
byte[] |
sign(byte[] a_message)
Signs a message and returns the signature. |
boolean |
verify(byte[] a_message,
byte[] a_signature)
Tests if the signature of a specified message is valid. |
Methods inherited from interface anon.crypto.ISignatureVerificationAlgorithm |
---|
getIdentifier, verify |
Methods inherited from interface anon.crypto.ISignatureCreationAlgorithm |
---|
getIdentifier |
Method Detail |
---|
void initVerify(IMyPublicKey a_publicKey) throws java.security.InvalidKeyException
a_publicKey
- a public key
java.security.InvalidKeyException
- if the key is invalidvoid initSign(IMyPrivateKey a_privateKey) throws java.security.InvalidKeyException
a_privateKey
- a private key
java.security.InvalidKeyException
- if the key is invalidboolean verify(byte[] a_message, byte[] a_signature)
verify
in interface ISignatureVerificationAlgorithm
a_message
- a messagea_signature
- a signature
byte[] sign(byte[] a_message)
sign
in interface ISignatureCreationAlgorithm
a_message
- a message
byte[] encodeForXMLSignature(byte[] a_signature)
encodeForXMLSignature
in interface ISignatureCreationAlgorithm
a_signature
- an non-encoded signature
http://www.w3.org/TR/xmldsig-core/#sec-SignatureAlg
byte[] decodeForXMLSignature(byte[] a_encodedSignature)
decodeForXMLSignature
in interface ISignatureVerificationAlgorithm
a_encodedSignature
- an encoded signature
http://www.w3.org/TR/xmldsig-core/#sec-SignatureAlg
java.lang.String getXMLSignatureAlgorithmReference()
getXMLSignatureAlgorithmReference
in interface ISignatureCreationAlgorithm
getXMLSignatureAlgorithmReference
in interface ISignatureVerificationAlgorithm
http://www.w3.org/TR/xmldsig-core/#sec-AlgID
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |