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 CryptoAlgorithm
getSignatureAlgorithm()
void
reset()
Will reset the internal state of this object.S
signAfterUpdate(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
- theHashCreator
to apply as extension.signer
- theSignatureSigner
to extend.
-
-
Method Detail
-
getSignatureAlgorithm
protected CryptoAlgorithm getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithm
in classSignatureProcessorImplWithHash
- Returns:
- the
CryptoAlgorithm
to extend.
-
signAfterUpdate
public S signAfterUpdate(boolean reset)
- Specified by:
signAfterUpdate
in interfaceSignatureSigner<S extends SignatureBinary>
- Parameters:
reset
- -true
toreset
after the signature has been generated,false
otherwise.- Returns:
- the final signature generated for the
processed data
.
-
signAfterUpdateRaw
public byte[] signAfterUpdateRaw(boolean reset)
- Specified by:
signAfterUpdateRaw
in interfaceSignatureSignerSimple
- Parameters:
reset
- -true
toreset
after the signature has been generated,false
otherwise.- Returns:
- the final signature generated for the
processed data
.
-
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()
-
-