(byte @NotNull [] key, byte @NotNull [] data, int offset, int length)
| 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 | } |
no test coverage detected