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 CryptoAlgorithm
getSignatureAlgorithm()
void
reset()
Will reset the internal state of this object.SignatureGeneric
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
-
SignatureSignerImplCryptorWithHash
public SignatureSignerImplCryptorWithHash(HashCreator hashGenerator, Encryptor encryptor)
The constructor.- Parameters:
hashGenerator
- theHashCreator
to apply as extension.encryptor
- theEncryptor
to use.
-
-
Method Detail
-
getSignatureAlgorithm
protected CryptoAlgorithm getSignatureAlgorithm()
- Specified by:
getSignatureAlgorithm
in classSignatureProcessorImplWithHash
- Returns:
- the
CryptoAlgorithm
to extend.
-
signAfterUpdate
public SignatureGeneric signAfterUpdate(boolean reset)
- Specified by:
signAfterUpdate
in interfaceSignatureSigner<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()
-
-