MCPcopy Create free account
hub / github.com/Snapchat/Valdi / doDigest

Function doDigest

valdi/src/valdi/runtime/Utils/BytesUtils.cpp:20–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20static void doDigest(const Byte* data, size_t length, Byte* output) {
21 SHA256_CTX sha256;
22 SHA256_Init(&sha256);
23 SHA256_Update(&sha256, data, length);
24 SHA256_Final(output, &sha256);
25}
26
27Ref<ByteBuffer> BytesUtils::sha256(const Byte* data, size_t length) {
28 auto bytes = makeShared<ByteBuffer>();

Callers 2

sha256Method · 0.85
sha256StringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected