| |
|
| com.sun.jbi.security.KeyStoreUtil
All known Subclasses: com.sun.jbi.framework.sun.SunASKeyStoreUtil,
KeyStoreUtil | public interface KeyStoreUtil (Code) | | KeyStoreUtil provides helper methods for encrypting and decrypting
Strings and/or byte arrays. An implementation is generally
expected to provide at least one default key for use in encrypting
and decrypting. The algorithm used for encrypting and decrypting
messages is chosen by the implementation; keys must match the
algorithm used by the implementation, so it's important that the
implementation also be the generator of the keys! The current
interface purposely tries to limit flexibility by not allowing the
user to use any key or any algorithm when invoking the encrypt and
decrypt methods.
version: $Revision: 1.4 $ |
Method Summary | |
public byte[] | decrypt(byte[] cipherText) | public String | decrypt(String base64EncodedCipherText) Decrypts a message using the key identified by keyName. | public byte[] | encrypt(byte[] clearText) Encrypts a message using a default key. | public String | encrypt(String clearText) Encrypts a message using a default key. |
decrypt | public byte[] decrypt(byte[] cipherText) throws KeyStoreException(Code) | | Decrypts a message using a default key
Parameters: cipherText - the byte array with the encrypted data the unencrypted byte array exception: KeyStoreException - if any error occurs retrieving thekey to be used |
decrypt | public String decrypt(String base64EncodedCipherText) throws KeyStoreException(Code) | | Decrypts a message using the key identified by keyName. The second
argument must be a Base-64 encoded string
Parameters: base64EncodedCipherText - a Base-64 Encoded string the decrypted message as a String exception: KeyStoreException - if any error occurs retrieving thekey to be used |
encrypt | public byte[] encrypt(byte[] clearText) throws KeyStoreException(Code) | | Encrypts a message using a default key.
Parameters: clearText - the byte array that will be encrypted the encrypted byte array exception: KeyStoreException - if any error occurs retrieving thekey to be used |
encrypt | public String encrypt(String clearText) throws KeyStoreException(Code) | | Encrypts a message using a default key. The result
is a Base64-encoded string.
Parameters: clearText - a String representing the message to be encrypted a Base64-encoded string representing the encrypted message exception: KeyStoreException - if any error occurs retrieving thekey to be used |
|
|
|