|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.jasypt.util.numeric.StrongIntegerNumberEncryptor
public final class StrongIntegerNumberEncryptor
Utility class for easily performing normal-strength encryption of BigInteger objects.
This class internally holds a StandardPBEBigIntegerEncryptor
configured this way:
The required steps to use it are:
setPassword(String)
or
setPasswordCharArray(char[])
).encrypt(BigInteger)
or
decrypt(BigInteger)
operations.This class is thread-safe.
Constructor Summary | |
---|---|
StrongIntegerNumberEncryptor()
Creates a new instance of StrongIntegerNumberEncryptor. |
Method Summary | |
---|---|
BigInteger |
decrypt(BigInteger encryptedNumber)
Decrypts a number. |
BigInteger |
encrypt(BigInteger number)
Encrypts a number |
void |
setPassword(String password)
Sets a password. |
void |
setPasswordCharArray(char[] password)
Sets a password, as a char[]. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StrongIntegerNumberEncryptor()
Method Detail |
---|
public void setPassword(String password)
password
- the password to be set.public void setPasswordCharArray(char[] password)
password
- the password to be set.public BigInteger encrypt(BigInteger number)
encrypt
in interface IntegerNumberEncryptor
number
- the number to be encrypted.StandardPBEBigIntegerEncryptor.encrypt(BigInteger)
public BigInteger decrypt(BigInteger encryptedNumber)
decrypt
in interface IntegerNumberEncryptor
encryptedNumber
- the number to be decrypted.StandardPBEBigIntegerEncryptor.decrypt(BigInteger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |