|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnu.studer.gradle.credentials.domain.Encryption
public final class Encryption
Encryption/decryption of text using ciphers.
Note: The author of this class is by far not a security expert. The chosen implementation has been primarily gathered from examples in the javax.crypto Javadoc and from discussions on StackOverflow. See also here for a more detailed explanation on the selected security algorithms.| Constructor Summary | |
Encryption(javax.crypto.Cipher ecipher, javax.crypto.Cipher dcipher)
|
|
| Method Summary | |
|---|---|
static Encryption
|
createEncryption(char[] passphrase)
Creates a new Encryption instance that uses password-based encryption (PBE). |
java.lang.String
|
decrypt(java.lang.String string)
Decrypts the given text. |
java.lang.String
|
encrypt(java.lang.String string)
Encrypts the given text. |
| Methods inherited from class java.lang.Object | |
|---|---|
| java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
| Constructor Detail |
|---|
public Encryption(javax.crypto.Cipher ecipher, javax.crypto.Cipher dcipher)
| Method Detail |
|---|
public static Encryption createEncryption(char[] passphrase)
passphrase - the passphrase to apply when creating the secret key
public java.lang.String decrypt(java.lang.String string)
string - the text to decrypt
public java.lang.String encrypt(java.lang.String string)
string - the text to encrypt
Groovy Documentation