Groovy Documentation

nu.studer.gradle.credentials.domain
[Java] Class CredentialsEncryptor

java.lang.Object
  nu.studer.gradle.credentials.domain.CredentialsEncryptor

public final class CredentialsEncryptor

Encrypts/decrypts credentials through password-based encryption.

See Also:
Encryption


Method Summary
java.lang.String decrypt(java.lang.String string)

Decrypts the given string.

java.lang.String encrypt(java.lang.String string)

Encrypts the given string.

static CredentialsEncryptor withPassphrase(char[] passphrase)

Creates a new instance that will use the given passphrase for all encryption/decryption activities.

 
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()
 

Method Detail

decrypt

public java.lang.String decrypt(java.lang.String string)
Decrypts the given string.
Parameters:
string - the string to decrypt
Returns:
the decrypted string


encrypt

public java.lang.String encrypt(java.lang.String string)
Encrypts the given string.
Parameters:
string - the string to encrypt
Returns:
the encrypted string


withPassphrase

public static CredentialsEncryptor withPassphrase(char[] passphrase)
Creates a new instance that will use the given passphrase for all encryption/decryption activities.
Parameters:
passphrase - the passphrase to encrypt/decrypt the credentials with
Returns:
the new instance


 

Groovy Documentation