|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.elca.el4j.util.encryption.PBEncryptor
public class PBEncryptor
En- / decrypts strings with a key derived from a user-supplied password with java's PBEStringEncryption (DES, MD5 password hash).
Constructor Summary | |
---|---|
PBEncryptor()
Constructor. |
Method Summary | |
---|---|
String |
decrypt(String enc)
Decrypts a string with the currently set password. |
void |
deriveKey(String password)
Hashes the password and converts it to a suitable format for the cipher. |
String |
encrypt(String plain)
Encrypts a string with the currently set password. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PBEncryptor() throws EncryptionException
EncryptionException
Method Detail |
---|
public void deriveKey(String password) throws EncryptionException
password
- The password to generate a key from.
Sets a valid key derived from the password.
EncryptionException
public String encrypt(String plain) throws EncryptionException
plain
- String.
EncryptionException
public String decrypt(String enc) throws EncryptionException
enc
- String.
EncryptionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |