Skip to content

Commit 6b6e3bd

Browse files
committed
Fixed the MD5Encoder deprecation warning.
1 parent 0fc5232 commit 6b6e3bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java/nginx/unit/websocket/DigestAuthenticator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.security.SecureRandom;
2323
import java.util.Map;
2424

25-
import org.apache.tomcat.util.security.MD5Encoder;
25+
import org.apache.tomcat.util.buf.HexUtils;
2626

2727
/**
2828
* Authenticator supporting the DIGEST auth method.
@@ -140,7 +140,7 @@ private String encodeMD5(String value) throws NoSuchAlgorithmException {
140140
MessageDigest md = MessageDigest.getInstance("MD5");
141141
byte[] thedigest = md.digest(bytesOfMessage);
142142

143-
return MD5Encoder.encode(thedigest);
143+
return HexUtils.toHexString(thedigest);
144144
}
145145

146146
@Override

0 commit comments

Comments
 (0)