Class SecurePasswordEncryption
- java.lang.Object
 - 
- org.pentaho.reporting.libraries.base.util.SecurePasswordEncryption
 
 
- 
public class SecurePasswordEncryption extends Object
 
- 
- 
Constructor Summary
Constructors Constructor Description SecurePasswordEncryption() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidappendAsHexString(byte[] encryptedData, StringBuffer b)protected static intbytesToInt(byte[] data, int offset)StringdecryptPassword(String password, String key)StringdecryptPassword(String password, SecretKey key, String algorithm)StringencryptPassword(String password, String key)StringencryptPassword(String password, SecretKey key, String algorithm)protected static byte[]intToByte(int value)protected static byte[]stringToBytes(String password) 
 - 
 
- 
- 
Method Detail
- 
encryptPassword
public String encryptPassword(String password, String key) throws GeneralSecurityException, UnsupportedEncodingException
 
- 
encryptPassword
public String encryptPassword(String password, SecretKey key, String algorithm) throws GeneralSecurityException, UnsupportedEncodingException
 
- 
appendAsHexString
protected static void appendAsHexString(byte[] encryptedData, StringBuffer b) 
- 
intToByte
protected static byte[] intToByte(int value)
 
- 
decryptPassword
public String decryptPassword(String password, String key) throws UnsupportedEncodingException, GeneralSecurityException
 
- 
decryptPassword
public String decryptPassword(String password, SecretKey key, String algorithm) throws UnsupportedEncodingException, GeneralSecurityException
 
- 
stringToBytes
protected static byte[] stringToBytes(String password) throws UnsupportedEncodingException
- Throws:
 UnsupportedEncodingException
 
- 
bytesToInt
protected static int bytesToInt(byte[] data, int offset) 
 - 
 
 -