Module io.github.mmm.crypto
Class SignatureSignerImplCryptorWithHash
- java.lang.Object
-
- io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
-
- io.github.mmm.crypto.asymmetric.sign.SignatureProcessorImplWithHash
-
- io.github.mmm.crypto.asymmetric.sign.SignatureSignerImplCryptorWithHash
-
- All Implemented Interfaces:
CryptoAlgorithm,SignatureProcessor,SignatureSigner<SignatureBinary>,SignatureSignerSimple,CryptoChunker,CryptoProcessor
public class SignatureSignerImplCryptorWithHash extends SignatureProcessorImplWithHash implements SignatureSigner<SignatureBinary>
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description SignatureSignerImplCryptorWithHash(HashCreator hashGenerator, Encryptor encryptor)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CryptoAlgorithmgetSignatureAlgorithm()voidreset()Will reset the internal state of this object.SignatureGenericsignAfterUpdate(boolean reset)byte[]signAfterUpdateRaw(boolean reset)-
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
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.sign.SignatureSigner
sign, sign, sign
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.sign.SignatureSignerSimple
process
-
-
-
-
Constructor Detail
-
SignatureSignerImplCryptorWithHash
public SignatureSignerImplCryptorWithHash(HashCreator hashGenerator, Encryptor encryptor)
The constructor.- Parameters:
hashGenerator- theHashCreatorto apply as extension.encryptor- theEncryptorto use.
-
-
Method Detail
-
getSignatureAlgorithm
protected CryptoAlgorithm getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithmin classSignatureProcessorImplWithHash- Returns:
- the
CryptoAlgorithmto extend.
-
signAfterUpdate
public SignatureGeneric signAfterUpdate(boolean reset)
- Specified by:
signAfterUpdatein interfaceSignatureSigner<SignatureBinary>- Parameters:
reset- -truetoresetafter the signature has been generated,falseotherwise.- Returns:
- the final signature generated for the
processed data.
-
signAfterUpdateRaw
public byte[] signAfterUpdateRaw(boolean reset)
- Specified by:
signAfterUpdateRawin interfaceSignatureSignerSimple- Parameters:
reset- -truetoresetafter the signature has been generated,falseotherwise.- Returns:
- the final signature generated for the
processed data.
-
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()
-
-