| 18 | } |
| 19 | |
| 20 | static 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 | |
| 27 | Ref<ByteBuffer> BytesUtils::sha256(const Byte* data, size_t length) { |
| 28 | auto bytes = makeShared<ByteBuffer>(); |
no outgoing calls
no test coverage detected