MCPcopy Create free account
hub / github.com/apple/foundationdb / computeAuthToken

Function computeAuthToken

flow/BlobCipher.cpp:758–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758StringRef computeAuthToken(const uint8_t* payload,
759 const int payloadLen,
760 const uint8_t* key,
761 const int keyLen,
762 Arena& arena) {
763 HmacSha256DigestGen hmacGenerator(key, keyLen);
764 StringRef digest = hmacGenerator.digest(payload, payloadLen, arena);
765
766 ASSERT_GE(digest.size(), AUTH_TOKEN_SIZE);
767 return digest;
768}
769
770// Only used to link unit tests
771void forceLinkBlobCipherTests() {}

Callers 5

encryptMethod · 0.85
verifyHeaderAuthTokenMethod · 0.85

Calls 2

digestMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected