mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-736: Replace JAXB DatatypeConverter with Guava BaseEncoding.
This commit is contained in:
@@ -98,13 +98,6 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Java XML -->
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Guacamole Extension API -->
|
||||
<dependency>
|
||||
<groupId>org.apache.guacamole</groupId>
|
||||
@@ -142,7 +135,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>19.0</version>
|
||||
<version>27.0.1-jre</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
@@ -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