Intel

Developer Zone

Cipher

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

      Methods
      Modifier and Type Method and Description
      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 encrypt
        inputIndex - index in the input array
        inputLength - input data length
        output - an array to hold the output data
        outputIndex - 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 illegal
        CryptoException - 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 decrypt
        inputIndex - index in the input array
        inputLength - input data length
        output - an array to hold the decrypted data
        outputIndex - 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 illegal
        CryptoException - if an internal error occurred