summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSergey A. Osokin <sergey.osokin@nginx.com>2023-11-20 10:56:41 -0500
committerSergey A. Osokin <sergey.osokin@nginx.com>2023-11-20 10:56:41 -0500
commit6b6e3bd8971a5fade4a4c5ab90a4156789127e33 (patch)
treed57ee835144a74145571ee7d10fd773fdce071c9 /src
parent0fc5232107e8701dc0d1f2a6008e2dbecb73293b (diff)
downloadunit-6b6e3bd8971a5fade4a4c5ab90a4156789127e33.tar.gz
unit-6b6e3bd8971a5fade4a4c5ab90a4156789127e33.tar.bz2
Fixed the MD5Encoder deprecation warning.
Diffstat (limited to 'src')
-rw-r--r--src/java/nginx/unit/websocket/DigestAuthenticator.java4
1 files changed, 2 insertions, 2 deletions
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