We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9960d51 commit 06f52dbCopy full SHA for 06f52db
src/main/java/org/scijava/util/DigestUtils.java
@@ -32,8 +32,7 @@
32
import java.io.UnsupportedEncodingException;
33
import java.security.MessageDigest;
34
import java.security.NoSuchAlgorithmException;
35
-
36
-import javax.xml.bind.DatatypeConverter;
+import java.util.Base64;
37
38
/**
39
* Utility class for computing cryptographic hashes.
@@ -98,7 +97,7 @@ public static String hex(final byte[] bytes) {
98
97
99
/** Converts the given byte array to a base64 string. */
100
public static String base64(final byte[] bytes) {
101
- return DatatypeConverter.printBase64Binary(bytes);
+ return new String(Base64.getEncoder().encode(bytes));
102
}
103
104
0 commit comments