-
- All Superinterfaces:
CryptoAlgorithm
- All Known Subinterfaces:
AbstractDecryptor
,AbstractEncryptor
,CryptoChunker
,Cryptor
,Decryptor
,Encryptor
,HashCreator
,SignatureProcessor
,SignatureSigner<S>
,SignatureSignerSimple
,SignatureVerifier<S>
,SignatureVerifierSimple
- All Known Implementing Classes:
CryptorImplCipher
,CryptorImplCombined
,DecryptorImplCipher
,DecryptorImplCombined
,EncryptorImplCiper
,EncryptorImplCombined
,HashCreatorImplCombined
,HashCreatorImplDigest
,HashCreatorImplMultipleRounds
,SignatureProcessorImpl
,SignatureProcessorImplEcBc
,SignatureProcessorImplWithHash
,SignatureSignerImpl
,SignatureSignerImplCryptorWithHash
,SignatureSignerImplEcBc
,SignatureSignerImplWithHash
,SignatureVerifierImpl
,SignatureVerifierImplCryptorWithHash
,SignatureVerifierImplEcBc
,SignatureVerifierImplWithHash
public interface CryptoProcessor extends CryptoAlgorithm
The abstract interface for any object that is based on a securityalgorithm
.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default byte[]
process(byte[] input)
Generic method to process and transform data.default byte[]
process(byte[] input, int offset, int length)
Generic method to process and transform data.default byte[]
process(byte[] input, int offset, int length, boolean complete)
Generic method to process and transform data.default byte[]
process(CryptoBinary input, boolean complete)
void
reset()
Will reset the internal state of this object.-
Methods inherited from interface io.github.mmm.crypto.algorithm.CryptoAlgorithm
getAlgorithm
-
-
-
-
Method Detail
-
process
default byte[] process(byte[] input)
Generic method to process and transform data.CryptoProcessor
Equivalent of process
(input)HashCreator
update
(input); returnhash
(true);Cryptor
return
crypt
(input, true);SignatureSigner
update
(input); returnsignAfterUpdateRaw
(true);SignatureVerifier
throw new
UnsupportedOperationException
();- Parameters:
input
- the data to process.- Returns:
- the transformed
input
data.
-
process
default byte[] process(byte[] input, int offset, int length)
Generic method to process and transform data.CryptoProcessor
Equivalent of process
(input, offset, length)HashCreator
update
(input, offset, length); returnhash
(true);Cryptor
return
crypt
(input, offset, length, true);SignatureSigner
update
(input, offset, length); returnsignAfterUpdate
(true);SignatureVerifier
throw new
UnsupportedOperationException
();- Parameters:
input
- the data to process.offset
- the index where to start reading data frominput
.length
- the number of bytes to read frominput
.- Returns:
- the transformed
input
data.
-
process
default byte[] process(byte[] input, int offset, int length, boolean complete)
Generic method to process and transform data.CryptoProcessor
Equivalent of process
(input, offset, length, complete)HashCreator
update
(input, offset, length); returnhash
(complete);Cryptor
return
crypt
(input, offset, length, true);SignatureSigner
update
(input, offset, length); returnsignAfterUpdate
(complete);SignatureVerifier
throw new
UnsupportedOperationException
();- Parameters:
input
- the data to process.offset
- the index where to start reading data frominput
.length
- the number of bytes to read frominput
.complete
- -true
to complete/reset this processor after processing the giveninput
,false
otherwise.- Returns:
- the transformed
input
data.
-
process
default byte[] process(CryptoBinary input, boolean complete)
- Parameters:
input
- theCryptoBinary
containing the data
to process.complete
- -true
to complete/reset this processor after processing the giveninput
,false
otherwise.- Returns:
- the transformed
input
data. - See Also:
process(byte[])
-
reset
void reset()
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.- See Also:
MessageDigest.reset()
-
-