public class AesEncryption extends Object
| Constructor and Description |
|---|
AesEncryption() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(String key,
byte[] encrypted)
decrypt as string
|
byte[] |
decrypt(String key,
String encrypted)
decrypt as string
|
String |
decryptAsString(String key,
String encrypted)
decrypt as string
|
String |
encrypt(String key,
byte[] value)
encrypt bytes
|
String |
encrypt(String key,
String value)
encrypt a string
|
public String encrypt(String key, String value)
key - the secret keyvalue - the string to encryptpublic String encrypt(String key, byte[] value)
key - the secret keyvalue - the bytes to encryptpublic String decryptAsString(String key, String encrypted)
key - the secret keyencrypted - the encrypted payloadpublic byte[] decrypt(String key, String encrypted)
key - the secret keyencrypted - the encrypted payloadpublic byte[] decrypt(String key, byte[] encrypted)
key - the secret keyencrypted - the encrypted payloadCopyright © 2017. All rights reserved.