public class SecurePasswordEncryption extends Object
| Constructor and Description |
|---|
SecurePasswordEncryption() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
appendAsHexString(byte[] encryptedData,
StringBuffer b) |
protected static int |
bytesToInt(byte[] data,
int offset) |
String |
decryptPassword(String password,
SecretKey key,
String algorithm) |
String |
decryptPassword(String password,
String key) |
String |
encryptPassword(String password,
SecretKey key,
String algorithm) |
String |
encryptPassword(String password,
String key) |
protected static byte[] |
intToByte(int value) |
protected static byte[] |
stringToBytes(String password) |
public String encryptPassword(String password, String key) throws GeneralSecurityException, UnsupportedEncodingException
public String encryptPassword(String password, SecretKey key, String algorithm) throws GeneralSecurityException, UnsupportedEncodingException
protected static void appendAsHexString(byte[] encryptedData,
StringBuffer b)
protected static byte[] intToByte(int value)
public String decryptPassword(String password, String key) throws UnsupportedEncodingException, GeneralSecurityException
public String decryptPassword(String password, SecretKey key, String algorithm) throws UnsupportedEncodingException, GeneralSecurityException
protected static byte[] stringToBytes(String password) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected static int bytesToInt(byte[] data,
int offset)
Copyright © 2017 Hitachi Vantara. All rights reserved.