com.intel.crypto
Interface Cipher
- All Known Subinterfaces:
- SequentialCipher
- All Known Implementing Classes:
- RsaAlg, SymmetricBlockCipherAlg
public interface Cipher
This interface represents an encryption algorithm. This interface supports only stateless operations, where all data is being processed in one method call.
- See Also:
SequentialCipher
Method Summary | |
---|---|
short |
decryptComplete(byte[] input,
short inputIndex,
short inputLength,
byte[] output,
short outputIndex)
Decrypts the provided input data using the key currently stored by the instance. |
short |
encryptComplete(byte[] input,
short inputIndex,
short inputLength,
byte[] output,
short outputIndex)
Encrypts the provided input data using the key currently stored by the instance. |
Method Detail |
---|
encryptComplete
short encryptComplete(byte[] input, short inputIndex, short inputLength, byte[] output, short outputIndex) throws CryptoException
- Encrypts the provided input data using the key currently stored by the instance.
- Parameters:
input
- the input data to encryptinputIndex
- index in the input arrayinputLength
- input data lengthoutput
- an array to hold the output dataoutputIndex
- index in the output array- Returns:
- The number of bytes returned in output array.
- Throws:
NotInitializedException
- if a required encryption parameter is not configured (for example, the key to be used for encryption)IllegalParameterException
- when one or more of the input parameters are illegalCryptoException
- if an internal error occurred
decryptComplete
short decryptComplete(byte[] input, short inputIndex, short inputLength, byte[] output, short outputIndex) throws CryptoException
- Decrypts the provided input data using the key currently stored by the instance.
- Parameters:
input
- the input data to decryptinputIndex
- index in the input arrayinputLength
- input data lengthoutput
- an array to hold the decrypted dataoutputIndex
- index in the output array- Returns:
- The number of bytes returned in output array.
- Throws:
NotInitializedException
- if a required decryption parameter is not configured (for example, the key to be used for decryption)IllegalParameterException
- when one or more of the input parameters are illegalCryptoException
- if an internal error occurred