iaik.cms
Interface ByteArrayCipherEngine

All Superinterfaces:
CipherEngine
All Known Subinterfaces:
ByteArrayAuthCipherEngine

public interface ByteArrayCipherEngine
extends CipherEngine

Generic Cipher engine for encrypting/decrypting data that is supplied by a byte array. Used by class EncryptedContentInfo for content en/decryption. Setups a cipher utility for encryption/decryption depending on the requested mode and en/deciphers the data that is supplied to method cipher.

Allows the implementation of en/deciphering utilities that may be independent from the JCE javax.crypto.Cipher engine. The default implementation, however, is based on the javax.crypto.Cipher engine.

An application that implements its own ByteArrayCipherEngine has to obverride the following SecurityProvider methods to plug-in its own implementation:

See Also:
SecurityProvider

Field Summary
 
Fields inherited from interface iaik.cms.CipherEngine
CIPHER_DECRYPT, CIPHER_ENCRYPT, CIPHER_NONE, CIPHER_UNWRAP, CIPHER_WRAP
 
Method Summary
 byte[] cipher(byte[] data)
          En/deciphers the data supplied by the given byte array.
 
Methods inherited from interface iaik.cms.CipherEngine
getParameters, initCipher, initCipher, setSecurityProvider
 

Method Detail

cipher

byte[] cipher(byte[] data)
              throws CMSCryptoException
En/deciphers the data supplied by the given byte array.

Parameters:
data - the data to be en/deciphered
Throws:
CMSCryptoException - if the cipher operation fails for some reason (e.g. because of an padding error)

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC