GUACAMOLE-736: Replace JAXB DatatypeConverter with Guava BaseEncoding.
This commit is contained in:
1 parent
87aa2e6c34
commit
37f1da9f1f
16 files changed
+58
-67
No files matched your search
+2
-2
@@ -19,10 +19,10 @@
|
||||
|
||||
package org.apache.guacamole.auth.jdbc.security;
|
||||
|
||||
import com.google.common.io.BaseEncoding;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
/**
|
||||
* Provides a SHA-256 based implementation of the password encryption
|
||||
@@ -40,7 +40,7 @@ public class SHA256PasswordEncryptionService implements PasswordEncryptionServic
|
||||
builder.append(password);
|
||||
|
||||
if (salt != null)
|
||||
builder.append(DatatypeConverter.printHexBinary(salt));
|
||||
builder.append(BaseEncoding.base16().encode(salt));
|
||||
|
||||
// Hash UTF-8 bytes of possibly-salted password
|
||||
MessageDigest md = MessageDigest.getInstance("SHA-256");
|
||||
|
||||
Reference in new issue
Block a user