Module io.github.mmm.crypto
Class SignatureVerifierImplCryptorWithHash
- java.lang.Object
-
- io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
-
- io.github.mmm.crypto.asymmetric.sign.SignatureProcessorImplWithHash
-
- io.github.mmm.crypto.asymmetric.sign.SignatureVerifierImplCryptorWithHash
-
- All Implemented Interfaces:
CryptoAlgorithm,SignatureProcessor,SignatureVerifier<SignatureBinary>,SignatureVerifierSimple,CryptoChunker,CryptoProcessor
public class SignatureVerifierImplCryptorWithHash extends SignatureProcessorImplWithHash implements SignatureVerifier<SignatureBinary>
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description SignatureVerifierImplCryptorWithHash(HashCreator hashGenerator, Decryptor decryptor)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DecryptorgetSignatureAlgorithm()voidreset()Will reset the internal state of this object.booleanverifyAfterUpdate(byte[] signature, int offset, int length)-
Methods inherited from class io.github.mmm.crypto.asymmetric.sign.SignatureProcessorImplWithHash
getAlgorithm, getHashGenerator, update
-
Methods inherited from class io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
creationFailedException, creationFailedException, creationFailedException, creationFailedException, getAlgorithm, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.crypto.algorithm.CryptoAlgorithm
getAlgorithm
-
Methods inherited from interface io.github.mmm.crypto.CryptoChunker
update, update, update
-
Methods inherited from interface io.github.mmm.crypto.CryptoProcessor
process, process, process, process
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.sign.SignatureVerifier
verify, verify, verify, verifyAfterUpdate, verifyUnsafe
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.sign.SignatureVerifierSimple
verify, verify, verify, verifyAfterUpdate
-
-
-
-
Constructor Detail
-
SignatureVerifierImplCryptorWithHash
public SignatureVerifierImplCryptorWithHash(HashCreator hashGenerator, Decryptor decryptor)
The constructor.- Parameters:
hashGenerator- theHashCreatorto apply as extension.decryptor- theDecryptorto extend.
-
-
Method Detail
-
getSignatureAlgorithm
protected Decryptor getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithmin classSignatureProcessorImplWithHash- Returns:
- the
CryptoAlgorithmto extend.
-
verifyAfterUpdate
public boolean verifyAfterUpdate(byte[] signature, int offset, int length)- Specified by:
verifyAfterUpdatein interfaceSignatureVerifierSimple- Parameters:
signature- thebytearray with the signature as raw data.offset- the index where to start reading data fromsignature.length- the number of bytes to read fromsignature.- Returns:
trueif the given signature is valid,falseotherwise.
-
reset
public void reset()
Description copied from interface:CryptoProcessorWill reset the internal state of this object. Please note that complex algorithms especially forCryptormay not reusable. It is therefore preferable to always create a fresh instance for each cryptographic task.- Specified by:
resetin interfaceCryptoProcessor- Overrides:
resetin classSignatureProcessorImplWithHash- See Also:
MessageDigest.reset()
-
-