public class PasswordManagement extends Object
| Constructor and Description |
|---|
PasswordManagement() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] cipherText)
Decrypts a message using a default key
|
String |
decrypt(String base64EncodedCipherText)
Decrypts a message using the key identified by keyName.
|
byte[] |
encrypt(byte[] clearText) |
String |
encrypt(String clearText)
Encrypts a message using a default key.
|
static void |
main(String[] args) |
public byte[] encrypt(byte[] clearText)
throws KeyStoreException
KeyStoreExceptionpublic byte[] decrypt(byte[] cipherText)
throws KeyStoreException
cipherText - the byte array with the encrypted dataKeyStoreException - if any error occurs retrieving the
key to be usedpublic String encrypt(String clearText) throws KeyStoreException
clearText - a String representing the message to be encryptedKeyStoreException - if any error occurs retrieving the
key to be usedpublic String decrypt(String base64EncodedCipherText) throws KeyStoreException
base64EncodedCipherText - a Base-64 Encoded stringKeyStoreException - if any error occurs retrieving the
key to be usedCopyright © 2011-2016 OpenESB Community. All Rights Reserved.