|
Sun Adapter for LDAP API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.stc.connector.ldapadapter.utils.cryptography.impl.CryptorImpl
public final class CryptorImpl
Provides a Cryptor implementation. The getInstance(Map aProperties) factory method returnes a new instance of this implementation each time. So it does not provide a singlton and does not pool any instances.
Use the CIPHER_KEY_ALIAS_PROPERTY_KEY, CIPHER_KEY_PASSWORD_PROPERTY_KEY, CIPHER_TRANSFORMATION_PROPERTY_KEY keys and the KEYSTORE_URL_PROPERTY_KEY, KEYSTORE_TYPE_PROPERTY_KEY, KEYSTORE_PASSWORD_PROPERTY_KEY keys defined in the KeyStoreUtil interface to set the desired values in the property map when acquiring an instance.
Cryptor
Field Summary |
---|
Fields inherited from interface com.stc.connector.ldapadapter.utils.cryptography.api.Cryptor |
---|
CIPHER_KEY_ALIAS_PROPERTY_KEY, CIPHER_KEY_PASSWORD_PROPERTY_KEY, CIPHER_TRANSFORMATION_PROPERTY_KEY |
Method Summary | |
---|---|
byte[] |
decodeBase64(byte[] aData)
Decodes the Base64 encoded aData. |
byte[] |
decodeBase64AndDecrypt(byte[] aData)
Decrypts the Base64 encoded aData and then decrypts using the same Cipher that was used to encrypt it. |
byte[] |
decrypt(byte[] aData)
Decrypts the aData using a Cipher. |
byte[] |
encodeBase64(byte[] aData)
Encodes the aData to Base64 encoded form. |
byte[] |
encrypt(byte[] aData)
Encrypts the aData using a Cipher. |
byte[] |
encryptAndEncodeBase64(byte[] aData)
Encrypts the aData using a Cipher and returns the results in Base64 encoded form. |
static Cryptor |
getInstance(java.util.Map aProperties)
This factory method returns a new instance of a Cryptor initializing it using the specified properties. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Cryptor getInstance(java.util.Map aProperties)
This factory method returns a new instance of a Cryptor initializing it using the specified properties.
Use the CIPHER_KEY_ALIAS_PROPERTY_KEY, CIPHER_KEY_PASSWORD_PROPERTY_KEY, CIPHER_TRANSFORMATION_PROPERTY_KEY keys and the KEYSTORE_URL_PROPERTY_KEY, KEYSTORE_TYPE_PROPERTY_KEY, KEYSTORE_PASSWORD_PROPERTY_KEY keys defined in the KeyStoreUtil interface to set the desired values in the property map when acquiring an instance.
aProperties
- The map view of the properties to use in getting the
instance.
public byte[] encrypt(byte[] aData)
Cryptor
encrypt
in interface Cryptor
aData
- The data to be encrypted.
Cryptor.encrypt(byte[] aData).
public byte[] decrypt(byte[] aData)
Cryptor
decrypt
in interface Cryptor
aData
- The encyrpted data.
Cryptor.decrypt(byte[] aData).
public byte[] encodeBase64(byte[] aData)
Cryptor
encodeBase64
in interface Cryptor
aData
- The data to be encoded in Base64.
Cryptor.encodeBase64(byte[] aData).
public byte[] decodeBase64(byte[] aData)
Cryptor
decodeBase64
in interface Cryptor
aData
- The Base64 encoded data.
Cryptor.decodeBase64(byte[] aData).
public byte[] encryptAndEncodeBase64(byte[] aData)
Cryptor
encryptAndEncodeBase64
in interface Cryptor
aData
- The data to be encrypted.
Cryptor.encryptAndEncodeBase64(byte[] aData).
public byte[] decodeBase64AndDecrypt(byte[] aData)
Cryptor
decodeBase64AndDecrypt
in interface Cryptor
aData
- The encyrpted data in Base64 encoded form.
Cryptor.decodeBase64AndDecrypt(byte[] aData).
public static void main(java.lang.String[] args)
|
Sun Adapter for LDAP API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |