public class BlowfishEasy
extends java.lang.Object
| Constructor and Description |
|---|
BlowfishEasy(char[] passw)
Constructor to use string data as the key.
|
BlowfishEasy(java.lang.String sPassword)
Deprecated.
use the BlowfishEasy(char[]) instead, since this constructor
discards the higher 8 bits of every 16bit Unicode character; be
aware that this constructor will produce non-compatible results to the
new method!
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
decryptString(java.lang.String sCipherText)
Decrypts a hexbin string (handling is case sensitive).
|
void |
destroy()
Destroys (clears) the encryption engine, after that the instance is not
valid anymore.
|
java.lang.String |
encryptString(java.lang.String sPlainText)
Encrypts a string (treated in Unicode) using the internal random
generator.
|
java.lang.String |
encryptString(java.lang.String sPlainText,
java.util.Random rndGen)
Encrypts a string (in Unicode).
|
public BlowfishEasy(java.lang.String sPassword)
sPassword - the passwordpublic BlowfishEasy(char[] passw)
passw - the password, usually gained by String.toCharArray()public java.lang.String encryptString(java.lang.String sPlainText)
sPlainText - string to encryptpublic java.lang.String encryptString(java.lang.String sPlainText,
java.util.Random rndGen)
sPlainText - string to encryptrndGen - random generator (usually a java.security.SecureRandom
instance)public java.lang.String decryptString(java.lang.String sCipherText)
sCipherText - hexbin string to decryptpublic void destroy()