Skip to content

Commit

Permalink
hash: add more methods to the hash.Hash interface, to match the ones …
Browse files Browse the repository at this point in the history
…in Go (#22001)
  • Loading branch information
einar-hjortdal authored Aug 7, 2024
1 parent 79ee4ae commit 258aed4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vlib/hash/hash.v
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 258aed4

Please sign in to comment.