Fixed the MD5Encoder deprecation warning.

This commit is contained in:
Sergey A. Osokin 2023-11-20 10:56:41 -05:00
parent 0fc5232107
commit 6b6e3bd897

View file

@ -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