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
 byte[] decrypt(byte[] ciphertext)
          Decrypt the ciphertext in byte array format to yield the original cleartext.
 String decrypt(String ciphertext)
          Decrypt the ciphertext to yield the original cleartext.
 byte[] encrypt(byte[] cleartext)
          Encrypt the cleartext in byte array format.
 String encrypt(String cleartext)
          Encrypt the cleartext
 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
The - encrypted ciphertext, in byte form
Throws:
CryptoException

encrypt

String encrypt(String cleartext)
               throws CryptoException
Encrypt the cleartext

Parameters:
cleartext - The text to be encrypted
The - encrypted ciphertext
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
The - decrypted cleartext, in byte form
Throws:
CryptoException

decrypt

String decrypt(String ciphertext)
               throws CryptoException
Decrypt the ciphertext to yield the original cleartext.

Parameters:
ciphertext - The text to be encrypted
The - decrypted cleartext
Throws:
CryptoException

unsealObject

Object unsealObject(Object object)
                    throws CryptoException
Throws:
CryptoException


Copyright © 2011. All Rights Reserved.