We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 265fe64 commit 6fef738Copy full SHA for 6fef738
semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac/MD5.java
@@ -26,10 +26,7 @@ private static String bytesToHex(byte[] bytes) {
26
}
27
28
public static String digest(CharSequence chars) throws NoSuchAlgorithmException {
29
- CharBuffer buf = CharBuffer.wrap(chars);
30
- byte[] bytes = StandardCharsets.UTF_8.encode(buf).array();
31
MessageDigest md5 = MessageDigest.getInstance("MD5");
32
- md5.digest(bytes);
33
- return bytesToHex(md5.digest());
+ return bytesToHex(md5.digest(chars.toString().getBytes()));
34
35
0 commit comments