From 6b6e3bd8971a5fade4a4c5ab90a4156789127e33 Mon Sep 17 00:00:00 2001 From: "Sergey A. Osokin" Date: Mon, 20 Nov 2023 10:56:41 -0500 Subject: Fixed the MD5Encoder deprecation warning. --- src/java/nginx/unit/websocket/DigestAuthenticator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/java/nginx') diff --git a/src/java/nginx/unit/websocket/DigestAuthenticator.java b/src/java/nginx/unit/websocket/DigestAuthenticator.java index 9530c303..eb91a9b4 100644 --- a/src/java/nginx/unit/websocket/DigestAuthenticator.java +++ b/src/java/nginx/unit/websocket/DigestAuthenticator.java @@ -22,7 +22,7 @@ import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.util.Map; -import org.apache.tomcat.util.security.MD5Encoder; +import org.apache.tomcat.util.buf.HexUtils; /** * Authenticator supporting the DIGEST auth method. @@ -140,7 +140,7 @@ public class DigestAuthenticator extends Authenticator { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] thedigest = md.digest(bytesOfMessage); - return MD5Encoder.encode(thedigest); + return HexUtils.toHexString(thedigest); } @Override -- cgit