Helper: hash a raw byte buffer via the public API.
| 15 | |
| 16 | // Helper: hash a raw byte buffer via the public API. |
| 17 | uint64_t hashBytes(const void *Data, size_t Len) { |
| 18 | WasmEdge::Hash::Hash H; |
| 19 | return H(std::string_view(static_cast<const char *>(Data), Len)); |
| 20 | } |
| 21 | |
| 22 | // Determinism: same input always produces same output within a process. |
| 23 | TEST(HashTest, Deterministic) { |