public class EncryptedTranscoder extends Object implements Transcoder
CipherBean. Default ciphering mode is set to 128-bit AES in CBC mode with compression.
Optional gzip compression of the serialized byte stream before encryption is supported and enabled by default.
| Constructor and Description |
|---|
EncryptedTranscoder() |
EncryptedTranscoder(org.cryptacular.bean.CipherBean cipherBean) |
| Modifier and Type | Method and Description |
|---|---|
protected KeyStore |
createAndPrepareKeyStore() |
Object |
decode(byte[] encoded)
Decodes a stream of bytes produced by
Transcoder.encode(Object) back into the original object. |
byte[] |
encode(Object o)
Encodes an object into a stream of bytes.
|
protected void |
setCipherBean(org.cryptacular.bean.CipherBean cipherBean) |
void |
setCompression(boolean compression) |
public EncryptedTranscoder()
throws IOException
IOExceptionpublic EncryptedTranscoder(org.cryptacular.bean.CipherBean cipherBean)
throws IOException
IOExceptionpublic void setCompression(boolean compression)
protected void setCipherBean(org.cryptacular.bean.CipherBean cipherBean)
public byte[] encode(Object o) throws IOException
Transcoderencode in interface Transcodero - Object to encode.IOException - On encoding errors.public Object decode(byte[] encoded) throws IOException
TranscoderTranscoder.encode(Object) back into the original object.decode in interface Transcoderencoded - Encoded representation of an object.IOException - On decoding errors.protected KeyStore createAndPrepareKeyStore()
Copyright © 2013-2016 Apereo. All Rights Reserved.