Package org.teiid.core.crypto
Interface Cryptor
-
- All Known Implementing Classes:
BasicCryptor,NullCryptor,SymmetricCryptor
public interface CryptorInterface 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.ObjectsealObject(Object object)ObjectunsealObject(Object object)
-
-
-
Method Detail
-
encrypt
byte[] encrypt(byte[] cleartext) throws CryptoExceptionEncrypt 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 CryptoExceptionDecrypt 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
-
-