java.lang.Object
com.sun.faces.util.ByteArrayGuardAESCTR
This utility class is to provide both encryption and decryption Ciphers
to
ResponseStateManager
implementations wishing to provide encryption support.
The algorithm used to encrypt byte array is AES with CBC.
Original author Inderjeet Singh, J2EE Blue Prints Team. Modified to suit Faces needs.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ByteArrayGuardAESCTR
public ByteArrayGuardAESCTR()
-
-
Method Details
-
encrypt
This method: Encrypts bytes using a cipher. Generates MAC for intialization vector of the cipher Generates MAC for encrypted data Returns a byte array consisting of the following concatenated together: |MAC for cnrypted Data | MAC for Init Vector | Encrypted Data |- Parameters:
value
- The value to be encrypted.- Returns:
- the encrypted value.
-
decrypt
- Throws:
InvalidKeyException
-