|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teiid.core.crypto.BasicCryptor
public class BasicCryptor
Public methods in this class throw only CryptoException
s.
Field Summary | |
---|---|
protected java.lang.String |
cipherAlgorithm
|
protected java.security.Key |
decryptKey
The key to be used for decryption. |
static java.lang.String |
ENCRYPT_PREFIX
|
protected javax.crypto.Cipher |
encryptCipher
The Cipher to use for encryption. |
static java.lang.String |
OLD_ENCRYPT_PREFIX
|
Constructor Summary | |
---|---|
BasicCryptor(java.security.Key encryptKey,
java.security.Key decryptKey,
java.lang.String algorithm)
|
Method Summary | |
---|---|
byte[] |
decrypt(byte[] ciphertext)
Decrypt the ciphertext to yield the original cleartext. |
java.lang.String |
decrypt(java.lang.String ciphertext)
Decrypt the ciphertext to yield the original cleartext. |
byte[] |
encrypt(byte[] cleartext)
Encrypt the cleartext in byte array format. |
java.lang.String |
encrypt(java.lang.String cleartext)
Encrypt the cleartext |
protected void |
initDecryptCipher()
Initialize the ciphers used for encryption and decryption. |
protected void |
initEncryptCipher()
Initialize the cipher used for encryption. |
java.lang.Object |
sealObject(java.lang.Object object)
|
static java.lang.String |
stripEncryptionPrefix(java.lang.String ciphertext)
|
java.lang.Object |
unsealObject(java.lang.Object object)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.security.Key decryptKey
protected javax.crypto.Cipher encryptCipher
Cipher
to use for encryption.
protected java.lang.String cipherAlgorithm
public static final java.lang.String OLD_ENCRYPT_PREFIX
public static final java.lang.String ENCRYPT_PREFIX
Constructor Detail |
---|
public BasicCryptor(java.security.Key encryptKey, java.security.Key decryptKey, java.lang.String algorithm) throws CryptoException
CryptoException
Method Detail |
---|
public byte[] decrypt(byte[] ciphertext) throws CryptoException
decrypt
in interface Cryptor
ciphertext
- The text to be encrypted, in byte formThe
- decrypted cleartext, in byte form
CryptoException
public java.lang.String decrypt(java.lang.String ciphertext) throws CryptoException
Cryptor
decrypt
in interface Cryptor
ciphertext
- The text to be encrypted
CryptoException
public static java.lang.String stripEncryptionPrefix(java.lang.String ciphertext)
protected void initDecryptCipher() throws CryptoException
CryptoException
public java.lang.Object unsealObject(java.lang.Object object) throws CryptoException
unsealObject
in interface Cryptor
CryptoException
public byte[] encrypt(byte[] cleartext) throws CryptoException
encrypt
in interface Cryptor
cleartext
- The text to be encrypted, in byte formThe
- encrypted ciphertext, in byte form
CryptoException
public java.lang.String encrypt(java.lang.String cleartext) throws CryptoException
Cryptor
encrypt
in interface Cryptor
cleartext
- The text to be encrypted
CryptoException
protected void initEncryptCipher() throws CryptoException
CryptoException
public java.lang.Object sealObject(java.lang.Object object) throws CryptoException
sealObject
in interface Cryptor
CryptoException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |