Module io.github.mmm.crypto
Class SignatureProcessorImpl
- java.lang.Object
-
- io.github.mmm.crypto.algorithm.AbstractSecurityAlgorithm
-
- io.github.mmm.crypto.asymmetric.sign.SignatureProcessorImpl
-
- All Implemented Interfaces:
CryptoAlgorithm
,SignatureProcessor
,CryptoChunker
,CryptoProcessor
- Direct Known Subclasses:
SignatureSignerImpl
,SignatureVerifierImpl
public abstract class SignatureProcessorImpl extends AbstractSecurityAlgorithm implements SignatureProcessor
Implementation ofSignatureProcessor
based onSignature
.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description SignatureProcessorImpl(Signature signature)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlgorithm()
protected Signature
getSignature()
void
reset()
Will reset the internal state of this object.void
update(byte[] input, int offset, int length)
-
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.CryptoChunker
update, update
-
Methods inherited from interface io.github.mmm.crypto.CryptoProcessor
process, process, process, process
-
-
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceCryptoAlgorithm
- Returns:
- the name of the underlying algorithm (e.g. "RSA", "NONEwithECDSA", etc.).
- See Also:
Key.getAlgorithm()
,Signature.getAlgorithm()
,MessageDigest.getAlgorithm()
,SecureRandom.getAlgorithm()
,Cipher.getAlgorithm()
-
update
public void update(byte[] input, int offset, int length)
- Specified by:
update
in interfaceCryptoChunker
- Parameters:
input
- the next chunk of data.offset
- the index where to start reading data frominput
.length
- the number of bytes to read frominput
.- See Also:
MessageDigest.update(byte[], int, int)
,Signature.update(byte[], int, int)
-
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
- See Also:
MessageDigest.reset()
-
-