mirror of https://github.com/apache/cloudstack.git
pbkdf2: fix encoding issue when converting byte[] to String
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 814e5574dc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
3786aa0e67
commit
694a694860
|
|
@ -133,8 +133,8 @@ public class PBKDF2UserAuthenticator extends DefaultUserAuthenticator {
|
|||
return !(plainPassword == null || plainPassword.isEmpty() || hash == null || hash.length == 0);
|
||||
}
|
||||
|
||||
private static String encode(byte[] input) {
|
||||
return new String(Base64.encode(input));
|
||||
private static String encode(byte[] input) throws UnsupportedEncodingException {
|
||||
return new String(Base64.encode(input), "UTF-8");
|
||||
}
|
||||
|
||||
private static byte[] decode(String input) throws UnsupportedEncodingException {
|
||||
|
|
|
|||
Loading…
Reference in New Issue