public class AESCipherTool extends Object
| Constructor and Description |
|---|
AESCipherTool(Path userSecretFile)
Create an AESCipherTool instance by passing in the path of a file containing the user secret.
|
AESCipherTool(String userSecret)
Create an AESCipherTool instance by passing in a user secret string.
|
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String value)
This method is used to decrypt a given encrypted and base64 encoded value.
|
String |
encrypt(String value)
This method is used to encrypt and base64 encode a plain value.
|
public AESCipherTool(String userSecret) throws AESCipherToolException
userSecret - User secret string to encode and decode a value.AESCipherToolException - if any error occurs while initializing the cipher tool.public AESCipherTool(Path userSecretFile) throws IOException, AESCipherToolException
userSecretFile - The path to the file containing the user secret.IOException - Thrown if any I/O error occurs while reading the user secret file.AESCipherToolException - Thrown if any error occurs while initializing the cipher tool.public String encrypt(String value) throws AESCipherToolException
value - Value to be encrypted.AESCipherToolException - Thrown if any error occurs while initializing the cipher tool.public String decrypt(String value) throws AESCipherToolException
value - Encrypted value to be decrypted.AESCipherToolException - Thrown if any error occurs while initializing the cipher tool.Copyright © 2019 WSO2. All rights reserved.