MCPcopy Create free account
hub / github.com/M66B/FairEmail / sha

Method sha

app/src/main/java/eu/faircode/email/Helper.java:3274–3277  ·  view source on GitHub ↗
(String digest, byte[] data)

Source from the content-addressed store, hash-verified

3272 }
3273
3274 static String sha(String digest, byte[] data) throws NoSuchAlgorithmException {
3275 byte[] bytes = MessageDigest.getInstance(digest).digest(data);
3276 return hex(bytes);
3277 }
3278
3279 static String getHash(InputStream is, String algorithm) throws NoSuchAlgorithmException, IOException {
3280 MessageDigest digest = MessageDigest.getInstance(algorithm);

Callers 3

sha1Method · 0.95
sha256Method · 0.95
md5Method · 0.95

Calls 3

hexMethod · 0.95
digestMethod · 0.65
getInstanceMethod · 0.45

Tested by

no test coverage detected