| |
|
| java.lang.Object org.ofbiz.base.crypto.BlowFishCrypt
BlowFishCrypt | public class BlowFishCrypt (Code) | | Blowfish (Two-Way) Byte/String encryption
author: Andy Zeneski version: $Revision: 1.1 $ since: 2.0 |
Constructor Summary | |
public | BlowFishCrypt(SecretKeySpec secretKeySpec) Creates a new BlowFishCrypt object. | public | BlowFishCrypt(byte[] key) Creates a new BlowFishCrypt object. | public | BlowFishCrypt(File keyFile) Creates a new BlowFishCrypt object. |
Method Summary | |
public byte[] | decrypt(String string) Decrypt the string with the secret key. | public byte[] | decrypt(byte[] bytes) Decrypt the byte array with the secret key. | public byte[] | encrypt(String string) Encrypt the string with the secret key. | public byte[] | encrypt(byte[] bytes) Encrypt the byte array with the secret key. | public static byte[] | generateKey() | public static void | main(String args) | public static boolean | testKey(byte[] key) |
BlowFishCrypt | public BlowFishCrypt(SecretKeySpec secretKeySpec)(Code) | | Creates a new BlowFishCrypt object.
Parameters: secretKeySpec - A SecretKeySpec object. |
BlowFishCrypt | public BlowFishCrypt(byte[] key)(Code) | | Creates a new BlowFishCrypt object.
Parameters: key - An encoded secret key |
BlowFishCrypt | public BlowFishCrypt(File keyFile)(Code) | | Creates a new BlowFishCrypt object.
Parameters: file - A file object containing the secret key as a String object. |
decrypt | public byte[] decrypt(String string)(Code) | | Decrypt the string with the secret key.
Parameters: string - The string to decrypt. |
decrypt | public byte[] decrypt(byte[] bytes)(Code) | | Decrypt the byte array with the secret key.
Parameters: bytes - The array of bytes to decrypt. |
encrypt | public byte[] encrypt(String string)(Code) | | Encrypt the string with the secret key.
Parameters: string - The string to encrypt. |
encrypt | public byte[] encrypt(byte[] bytes)(Code) | | Encrypt the byte array with the secret key.
Parameters: bytes - The array of bytes to encrypt. |
testKey | public static boolean testKey(byte[] key)(Code) | | |
|
|
|