Added Gravatar support

This commit is contained in:
M66B
2020-01-17 16:59:29 +01:00
parent 0b16601726
commit 3b192301a3
11 changed files with 81 additions and 12 deletions

View File

@@ -707,6 +707,10 @@ public class Helper {
return sha("SHA-256", data);
}
static String md5(byte[] data) throws NoSuchAlgorithmException {
return sha("MD5", data);
}
static String sha(String digest, byte[] data) throws NoSuchAlgorithmException {
byte[] bytes = MessageDigest.getInstance(digest).digest(data);
StringBuilder sb = new StringBuilder();