src.groovy.cr.co.arquetipos.crypto
Class Blowfish

java.lang.Object
  src.groovy.cr.co.arquetipos.crypto.Blowfish

class Blowfish

Constructor Summary
Blowfish()

 
Method Summary
static byte[] decrypt(byte[] data, java.lang.String password)

Decrypts a byte array and returns the result.

static java.lang.String decryptBase64(java.lang.String data, java.lang.String password, boolean trim = true)

Decrypts a base64-encoded string and returns the result.

static byte[] encrypt(byte[] data, java.lang.String password)

Encrypts a byte array and returns the result

static java.lang.String encryptBase64(byte[] data, java.lang.String password)

Encrypts a byte array and returns a base64-encoded string

static java.lang.String encryptBase64(java.lang.String data, java.lang.String password)

Encrypts a string and returns the result base64-encoded

static byte[] process(byte[] data, java.lang.String password, boolean encrypting = true)

Encrypts or decrypts a byte array.

 
Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll
 

Constructor Detail

Blowfish

Blowfish()


 
Method Detail

decrypt

public static byte[] decrypt(byte[] data, java.lang.String password)
Decrypts a byte array and returns the result. In case of an error, it returns null


decryptBase64

public static java.lang.String decryptBase64(java.lang.String data, java.lang.String password, boolean trim = true)
Decrypts a base64-encoded string and returns the result. In case of an error, it returns null


encrypt

public static byte[] encrypt(byte[] data, java.lang.String password)
Encrypts a byte array and returns the result


encryptBase64

public static java.lang.String encryptBase64(byte[] data, java.lang.String password)
Encrypts a byte array and returns a base64-encoded string


encryptBase64

public static java.lang.String encryptBase64(java.lang.String data, java.lang.String password)
Encrypts a string and returns the result base64-encoded


process

public static byte[] process(byte[] data, java.lang.String password, boolean encrypting = true)
Encrypts or decrypts a byte array.
param:
data Data to be encrypted or decrypted
param:
password Password to use
param:
encrypting Are we encrypting or decrypting?


 

Groovy Documentation