public final class StrongDecimalNumberEncryptor extends Object implements DecimalNumberEncryptor
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 and Description |
|---|
StrongDecimalNumberEncryptor()
Creates a new instance of StrongDecimalNumberEncryptor.
|
| Modifier and Type | Method and Description |
|---|---|
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[].
|
public StrongDecimalNumberEncryptor()
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 DecimalNumberEncryptornumber - the number to be encrypted.StandardPBEBigDecimalEncryptor.encrypt(BigDecimal)public BigDecimal decrypt(BigDecimal encryptedNumber)
decrypt in interface DecimalNumberEncryptorencryptedNumber - the number to be decrypted.StandardPBEBigDecimalEncryptor.decrypt(BigDecimal)Copyright © 2017 JBoss by Red Hat. All rights reserved.