Class PasswordObscurification48
java.lang.Object
org.pentaho.reporting.libraries.base.util.PasswordObscurification48
This class handles basic password obscurification.
Pentaho Reporting 4.8 was compiled with an invalid file encoding and the SEED value given in this class was corrupted
in the process. Since version 5.0, this text is now ASCII only using unicode escapes and thus is no longer affected
by compile-time settings.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The word that is put before a password to indicate an encrypted form. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
charToHex
(int c) static String
decryptPassword
(String encrypted) static String
decryptPasswordWithOptionalEncoding
(String password) Decrypts a password if it contains the prefix "Encrypted "static String
encryptPassword
(String password) static String
encryptPasswordWithOptionalEncoding
(String password)
-
Field Details
-
PASSWORD_ENCRYPTED_PREFIX
The word that is put before a password to indicate an encrypted form. If this word is not present, the password is considered to be NOT encrypted- See Also:
-
-
Method Details
-
charToHex
- Throws:
UnsupportedEncodingException
-
encryptPassword
-
decryptPassword
-
encryptPasswordWithOptionalEncoding
-
decryptPasswordWithOptionalEncoding
Decrypts a password if it contains the prefix "Encrypted "- Parameters:
password
- The encrypted password- Returns:
- The decrypted password or the original value if the password doesn't start with "Encrypted "
-