MCPcopy Create free account
hub / github.com/e2wugui/zeze / hmacMd5

Method hmacMd5

ZezeJava/ZezeJava/src/main/java/Zeze/Net/Digest.java:24–33  ·  view source on GitHub ↗
(byte @NotNull [] key, byte @NotNull [] data, int offset, int length)

Source from the content-addressed store, hash-verified

22 }
23
24 public static byte @NotNull [] hmacMd5(byte @NotNull [] key, byte @NotNull [] data, int offset, int length) {
25 try {
26 var mac = Mac.getInstance("HmacMD5");
27 mac.init(new SecretKeySpec(key, 0, key.length, "HmacMD5"));
28 mac.update(data, offset, length);
29 return mac.doFinal();
30 } catch (Exception e) {
31 throw Task.forceThrow(e);
32 }
33 }
34
35 private Digest() {
36 }

Callers 2

processCHandshakeMethod · 0.95
processSHandshakeMethod · 0.95

Calls 4

forceThrowMethod · 0.95
initMethod · 0.65
updateMethod · 0.65
getInstanceMethod · 0.45

Tested by

no test coverage detected