@javax.inject.Singleton @groovy.util.logging.Slf4j class Encrypt extends java.lang.Object
Utility for generating SHA-256 hashes and performing AES encryption/decryption using a password and a 128-bit secret key.
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
decrypt(java.lang.String value) Decrypt a value that was encrypted with this secret key. |
|
java.lang.String |
encrypt(java.lang.String value) Encrypt a string. |
|
java.lang.String |
hash(java.lang.String value)
|
|
static java.lang.String |
sha256(java.lang.String value)
|
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Decrypt a value that was encrypted with this secret key.
value
- A base 64 encoded stringEncrypt a string.
value
- The text to encrypt
value
- A plaintext string
value
- A plaintext string