public class AesEncryptor extends Object implements Encryptor
setKey(byte[])
method to provide a custom
key prior to invoking the encrypt(java.lang.String)
or decrypt(java.lang.String)
methods.Constructor and Description |
---|
AesEncryptor()
Default constructor
|
AesEncryptor(String key)
Custom key constructor
|
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String value)
Decrypt an encrypted String.
|
String |
decrypt(String value,
byte[] iv)
Decrypt an encrypted String.
|
String |
encrypt(String value)
Encrypt a clear text String.
|
String |
encrypt(String value,
byte[] iv)
Encrypt a clear text String.
|
void |
setKey(String key)
Set the encryption key.
|
public AesEncryptor()
public AesEncryptor(String key)
key
- the custom keypublic String encrypt(String value)
Encryptor
public String encrypt(String value, byte[] iv)
Encryptor
public String decrypt(String value)
Encryptor
public String decrypt(String value, byte[] iv)
Encryptor
Copyright © 2003–2020 Ignite Realtime. All rights reserved.