mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Use key ID instead of fingerprint when possible
This commit is contained in:
@@ -829,6 +829,10 @@ public class Helper {
|
||||
|
||||
static String sha(String digest, byte[] data) throws NoSuchAlgorithmException {
|
||||
byte[] bytes = MessageDigest.getInstance(digest).digest(data);
|
||||
return hex(bytes);
|
||||
}
|
||||
|
||||
static String hex(byte[] bytes) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (byte b : bytes)
|
||||
sb.append(String.format("%02x", b));
|
||||
|
||||
Reference in New Issue
Block a user