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 Decryptor
getSignatureAlgorithm()
void
reset()
Will reset the internal state of this object.boolean
verifyAfterUpdate(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
- theHashCreator
to apply as extension.decryptor
- theDecryptor
to extend.
-
-
Method Detail
-
getSignatureAlgorithm
protected Decryptor getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithm
in classSignatureProcessorImplWithHash
- Returns:
- the
CryptoAlgorithm
to extend.
-
verifyAfterUpdate
public boolean verifyAfterUpdate(byte[] signature, int offset, int length)
- Specified by:
verifyAfterUpdate
in interfaceSignatureVerifierSimple
- Parameters:
signature
- thebyte
array with the signature as raw data.offset
- the index where to start reading data fromsignature
.length
- the number of bytes to read fromsignature
.- Returns:
true
if the given signature is valid,false
otherwise.
-
reset
public void reset()
Description copied from interface:CryptoProcessor
Will reset the internal state of this object. Please note that complex algorithms especially forCryptor
may not reusable. It is therefore preferable to always create a fresh instance for each cryptographic task.- Specified by:
reset
in interfaceCryptoProcessor
- Overrides:
reset
in classSignatureProcessorImplWithHash
- See Also:
MessageDigest.reset()
-
-