Module io.github.mmm.crypto
Class SignatureSignerImplWithHash<S extends SignatureBinary>
- java.lang.Object
-
- io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
-
- io.github.mmm.crypto.asymmetric.sign.SignatureProcessorImplWithHash
-
- io.github.mmm.crypto.asymmetric.sign.SignatureSignerImplWithHash<S>
-
- Type Parameters:
S- type ofSignatureBinary.
- All Implemented Interfaces:
CryptoAlgorithm,SignatureProcessor,SignatureSigner<S>,SignatureSignerSimple,CryptoChunker,CryptoProcessor
public class SignatureSignerImplWithHash<S extends SignatureBinary> extends SignatureProcessorImplWithHash implements SignatureSigner<S>
- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description SignatureSignerImplWithHash(HashCreator hashGenerator, SignatureSigner<S> signer)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.SsignAfterUpdate(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
-
SignatureSignerImplWithHash
public SignatureSignerImplWithHash(HashCreator hashGenerator, SignatureSigner<S> signer)
The constructor.- Parameters:
hashGenerator- theHashCreatorto apply as extension.signer- theSignatureSignerto extend.
-
-
Method Detail
-
getSignatureAlgorithm
protected CryptoAlgorithm getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithmin classSignatureProcessorImplWithHash- Returns:
- the
CryptoAlgorithmto extend.
-
signAfterUpdate
public S signAfterUpdate(boolean reset)
- Specified by:
signAfterUpdatein interfaceSignatureSigner<S extends 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()
-
-