public interface ByteArrayCipherEngine extends CipherEngine
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:
SecurityProvider
CIPHER_DECRYPT, CIPHER_ENCRYPT, CIPHER_NONE, CIPHER_UNWRAP, CIPHER_WRAP
Modifier and Type | Method and Description |
---|---|
byte[] |
cipher(byte[] data)
En/deciphers the data supplied by the given byte array.
|
getParameters, initCipher, initCipher, setSecurityProvider
byte[] cipher(byte[] data) throws CMSCryptoException
data
- the data to be en/decipheredCMSCryptoException
- if the cipher operation fails for some reason (e.g. because
of an padding error)