Package org.teiid.core.crypto
Interface Cryptor
-
- All Known Implementing Classes:
BasicCryptor
,NullCryptor
,SymmetricCryptor
public interface Cryptor
Interface defining a utility that can perform both encryption and decryption.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
decrypt(byte[] ciphertext)
Decrypt the ciphertext in byte array format to yield the original cleartext.byte[]
encrypt(byte[] cleartext)
Encrypt the cleartext in byte array format.Object
sealObject(Object object)
Object
unsealObject(Object object)
-
-
-
Method Detail
-
encrypt
byte[] encrypt(byte[] cleartext) throws CryptoException
Encrypt the cleartext in byte array format.- Parameters:
cleartext
- The text to be encrypted, in byte form- Returns:
- The encrypted ciphertext, in byte form
- Throws:
CryptoException
-
sealObject
Object sealObject(Object object) throws CryptoException
- Throws:
CryptoException
-
decrypt
byte[] decrypt(byte[] ciphertext) throws CryptoException
Decrypt the ciphertext in byte array format to yield the original cleartext.- Parameters:
ciphertext
- The text to be encrypted, in byte form- Returns:
- The decrypted cleartext, in byte form
- Throws:
CryptoException
-
unsealObject
Object unsealObject(Object object) throws CryptoException
- Throws:
CryptoException
-
-