Package org.apache.ofbiz.base.crypto
Class BlowFishCrypt
java.lang.Object
org.apache.ofbiz.base.crypto.BlowFishCrypt
Blowfish (Two-Way) Byte/String encryption
-
Constructor Summary
ConstructorDescriptionBlowFishCrypt
(File keyFile) Creates a new BlowFishCrypt object.BlowFishCrypt
(SecretKeySpec secretKeySpec) Creates a new BlowFishCrypt object. -
Method Summary
-
Constructor Details
-
BlowFishCrypt
Creates a new BlowFishCrypt object.- Parameters:
secretKeySpec
- A SecretKeySpec object.
-
BlowFishCrypt
Creates a new BlowFishCrypt object.- Parameters:
keyFile
- A file object containing the secret key as a String object.
-
-
Method Details
-
encrypt
Encrypt the string with the secret key.- Parameters:
string
- The string to encrypt.
-
encrypt
public byte[] encrypt(byte[] bytes) Encrypt the byte array with the secret key.- Parameters:
bytes
- The array of bytes to encrypt.
-
main
- Throws:
Exception
-