MCPcopy Index your code
hub / github.com/ccxt/ccxt / hmac

Method hmac

java/lib/src/main/java/io/github/ccxt/base/Crypto.java:140–148  ·  view source on GitHub ↗
(String jceName, byte[] data, byte[] key)

Source from the content-addressed store, hash-verified

138 }
139
140 private static byte[] hmac(String jceName, byte[] data, byte[] key) {
141 try {
142 Mac mac = Mac.getInstance(jceName);
143 mac.init(new SecretKeySpec(key, jceName));
144 return mac.doFinal(data);
145 } catch (GeneralSecurityException e) {
146 throw new RuntimeException(e);
147 }
148 }
149
150 public static String hmac(Object request2, Object secret2, Object algorithm2, String digest) {
151 return Hmac(request2, secret2, algorithm2, digest);

Callers 15

HmacMethod · 0.95
hmacRawMethod · 0.95
SignHMACSHA256Method · 0.95
SignHMACSHA384Method · 0.95
SignHMACSHA512Method · 0.95
SignHMACMD5Method · 0.95
hmacMethod · 0.95
signMethod · 0.45
signMethod · 0.45
signMessageMethod · 0.45
signMethod · 0.45
signMethod · 0.45

Calls 2

HmacMethod · 0.95
initMethod · 0.45

Tested by 1

hmacMethod · 0.76