Package org.apereo.cas.web.flow.executor
Class EncryptedTranscoder
java.lang.Object
org.apereo.cas.web.flow.executor.EncryptedTranscoder
- All Implemented Interfaces:
Transcoder
Encodes an object by encrypting its serialized byte stream. Details of encryption are handled by an instance of
CipherBean.
Optional gzip compression of the serialized byte stream before encryption is supported and enabled by default.
- Since:
- 6.1
-
Constructor Summary
ConstructorsConstructorDescriptionEncryptedTranscoder(org.cryptacular.bean.CipherBean cipherBean) EncryptedTranscoder(org.cryptacular.bean.CipherBean cipherBean, boolean compression) Creates a newEncryptedTranscoderinstance. -
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] encoded) Decodes a stream of bytes produced byTranscoder.encode(Object)back into the original object.byte[]Encodes an object into a stream of bytes.
-
Constructor Details
-
EncryptedTranscoder
public EncryptedTranscoder(org.cryptacular.bean.CipherBean cipherBean) -
EncryptedTranscoder
public EncryptedTranscoder(org.cryptacular.bean.CipherBean cipherBean, boolean compression) Creates a newEncryptedTranscoderinstance.- Parameters:
cipherBean- Handles encryption/decryption details.compression- Flag to indicate whether to Gzip compression before encryption.
-
-
Method Details
-
encode
Description copied from interface:TranscoderEncodes an object into a stream of bytes.- Specified by:
encodein interfaceTranscoder- Parameters:
o- Object to encode.- Returns:
- Object encoded as a byte array.
- Throws:
IOException- On encoding errors.
-
decode
Description copied from interface:TranscoderDecodes a stream of bytes produced byTranscoder.encode(Object)back into the original object.- Specified by:
decodein interfaceTranscoder- Parameters:
encoded- Encoded representation of an object.- Returns:
- Object decoded from byte array.
- Throws:
IOException- On decoding errors.
-