MCPcopy Create free account
hub / github.com/apache/cloudberry / sha256hmac

Function sha256hmac

gpcontrib/gpcloud/src/s3utils.cpp:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57bool sha256hmac(const char *str, unsigned char out_hash[32], const char *secret, int secret_len) {
58 if (!str) return false;
59
60 // SHA256_DIGEST_LENGTH is 32
61 HMAC(EVP_sha256(), secret, secret_len, (unsigned char *)str, strlen(str), out_hash, NULL);
62 return true;
63}
64
65bool sha256hmac_hex(const char *str, char out_hash_hex[65], const char *secret, int secret_len) {
66 if (!str) return false;

Callers 2

sha256hmac_hexFunction · 0.85
SignRequestV4Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected