public interface IMySignature extends ISignatureVerificationAlgorithm, ISignatureCreationAlgorithm
Modifier and Type | Method and Description |
---|---|
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.
|
getIdentifier, verify
getIdentifier
void initVerify(IMyPublicKey a_publicKey) throws java.security.InvalidKeyException
a_publicKey
- a public keyjava.security.InvalidKeyException
- if the key is invalidvoid initSign(IMyPrivateKey a_privateKey) throws java.security.InvalidKeyException
a_privateKey
- a private keyjava.security.InvalidKeyException
- if the key is invalidboolean verify(byte[] a_message, byte[] a_signature)
verify
in interface ISignatureVerificationAlgorithm
a_message
- a messagea_signature
- a signaturebyte[] sign(byte[] a_message)
sign
in interface ISignatureCreationAlgorithm
a_message
- a messagebyte[] encodeForXMLSignature(byte[] a_signature)
encodeForXMLSignature
in interface ISignatureCreationAlgorithm
a_signature
- an non-encoded signaturehttp://www.w3.org/TR/xmldsig-core/#sec-SignatureAlg
byte[] decodeForXMLSignature(byte[] a_encodedSignature)
decodeForXMLSignature
in interface ISignatureVerificationAlgorithm
a_encodedSignature
- an encoded signaturehttp://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
Copyright © 2023. All rights reserved.