|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.jasypt.util.numeric.StrongDecimalNumberEncryptor
public final class StrongDecimalNumberEncryptor
Utility class for easily performing normal-strength encryption of BigDecimal objects.
This class internally holds a StandardPBEBigDecimalEncryptor
configured this way:
The required steps to use it are:
setPassword(String)
or
setPasswordCharArray(char[])
).encrypt(BigDecimal)
or
decrypt(BigDecimal)
operations.This class is thread-safe.
Constructor Summary | |
---|---|
StrongDecimalNumberEncryptor()
Creates a new instance of StrongDecimalNumberEncryptor. |
Method Summary | |
---|---|
BigDecimal |
decrypt(BigDecimal encryptedNumber)
Decrypts a number. |
BigDecimal |
encrypt(BigDecimal 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 StrongDecimalNumberEncryptor()
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 BigDecimal encrypt(BigDecimal number)
encrypt
in interface DecimalNumberEncryptor
number
- the number to be encrypted.StandardPBEBigDecimalEncryptor.encrypt(BigDecimal)
public BigDecimal decrypt(BigDecimal encryptedNumber)
decrypt
in interface DecimalNumberEncryptor
encryptedNumber
- the number to be decrypted.StandardPBEBigDecimalEncryptor.decrypt(BigDecimal)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |