|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ofbiz.base.crypto.BlowFishCrypt
public class BlowFishCrypt
Blowfish (Two-Way) Byte/String encryption
Constructor Summary | |
---|---|
BlowFishCrypt(byte[] key)
Creates a new BlowFishCrypt object. |
|
BlowFishCrypt(java.io.File keyFile)
Creates a new BlowFishCrypt object. |
|
BlowFishCrypt(javax.crypto.spec.SecretKeySpec secretKeySpec)
Creates a new BlowFishCrypt object. |
Method Summary | |
---|---|
byte[] |
decrypt(byte[] bytes)
Decrypt the byte array with the secret key. |
byte[] |
decrypt(java.lang.String string)
Decrypt the string with the secret key. |
byte[] |
encrypt(byte[] bytes)
Encrypt the byte array with the secret key. |
byte[] |
encrypt(java.lang.String string)
Encrypt the string with the secret key. |
static byte[] |
generateKey()
|
static void |
main(java.lang.String[] args)
|
static boolean |
testKey(byte[] key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlowFishCrypt(javax.crypto.spec.SecretKeySpec secretKeySpec)
secretKeySpec
- A SecretKeySpec object.public BlowFishCrypt(byte[] key)
key
- An encoded secret keypublic BlowFishCrypt(java.io.File keyFile)
keyFile
- A file object containing the secret key as a String object.Method Detail |
---|
public byte[] encrypt(java.lang.String string)
string
- The string to encrypt.public byte[] decrypt(java.lang.String string)
string
- The string to decrypt.public byte[] encrypt(byte[] bytes)
bytes
- The array of bytes to encrypt.public byte[] decrypt(byte[] bytes)
bytes
- The array of bytes to decrypt.public static byte[] generateKey() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static boolean testKey(byte[] key)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |