From 258aed44fe8a44b3aae00fdae22d32c00947e4b3 Mon Sep 17 00:00:00 2001 From: Coachonko <102909397+Coachonko@users.noreply.github.com> Date: Wed, 7 Aug 2024 18:53:57 +0200 Subject: [PATCH] hash: add more methods to the hash.Hash interface, to match the ones in Go (#22001) --- vlib/hash/hash.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/hash/hash.v b/vlib/hash/hash.v index 2c610133b9..4fbd37fd6d 100644 --- a/vlib/hash/hash.v +++ b/vlib/hash/hash.v @@ -4,11 +4,15 @@ module hash pub interface Hash { +mut: // Sum appends the current hash to b and returns the resulting array. // It does not change the underlying hash state. sum(b []u8) []u8 size() int block_size() int + free() + reset() + write(p []u8) !int } interface Hash32er {