Use key ID instead of fingerprint when possible

This commit is contained in:
M66B
2020-01-31 20:20:44 +01:00
parent 72eeb98389
commit f920601a22
2 changed files with 48 additions and 12 deletions

View File

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