Class SHA256withECDSA
java.lang.Object
de.christofreichardt.json.websignature.SHA256withECDSA
- All Implemented Interfaces:
de.christofreichardt.diagnosis.Traceable,JWSAlgorithm
An apapter to the underlying Signature instance provided by the Java platform which has the same name.
- Author:
- Christof Reichardt
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the underlying algorithm object.de.christofreichardt.diagnosis.AbstractTracervoidInitialises the underlying algorithm provided by the Java platform with the given key.byte[]Requests a signature from the underlying algorithm for the delivered bytes.voidupdate(byte[] data) Hands over the given bytes to the underlying algorithm provided by the Java platform.booleanverify(byte[] signature) Requests the validation of the delivered data agianst the given signature.
-
Method Details
-
init
Description copied from interface:JWSAlgorithmInitialises the underlying algorithm provided by the Java platform with the given key.- Specified by:
initin interfaceJWSAlgorithm- Parameters:
key- the cryptographic key used for signing or validating.- Throws:
GeneralSecurityException- if something goes wrong during the initialization.
-
update
Description copied from interface:JWSAlgorithmHands over the given bytes to the underlying algorithm provided by the Java platform.- Specified by:
updatein interfaceJWSAlgorithm- Parameters:
data- the data to be signed or to be validated.- Throws:
GeneralSecurityException- if something goes wrong during the update, e.g. the underlying algorithm hasn't been properly initialized.
-
signature
Description copied from interface:JWSAlgorithmRequests a signature from the underlying algorithm for the delivered bytes.- Specified by:
signaturein interfaceJWSAlgorithm- Returns:
- the signature bytes
- Throws:
GeneralSecurityException- if the underlying algorithm couldn't process the delivered data for various reasons.
-
verify
Description copied from interface:JWSAlgorithmRequests the validation of the delivered data agianst the given signature.- Specified by:
verifyin interfaceJWSAlgorithm- Parameters:
signature- the signature bytes.- Returns:
- indicates if the signature has been valid.
- Throws:
GeneralSecurityException- if the underlying algorithm couldn't process the delivered data for various reasons.
-
algorithm
Description copied from interface:JWSAlgorithmReturns the name of the underlying algorithm object.- Specified by:
algorithmin interfaceJWSAlgorithm- Returns:
- the name of the underlying algorithm object.
-
getCurrentTracer
public de.christofreichardt.diagnosis.AbstractTracer getCurrentTracer()- Specified by:
getCurrentTracerin interfacede.christofreichardt.diagnosis.Traceable
-