mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
hash: add more methods to the hash.Hash interface, to match the ones in Go (#22001)
This commit is contained in:
parent
79ee4ae046
commit
258aed44fe
1 changed files with 4 additions and 0 deletions
|
@ -4,11 +4,15 @@
|
||||||
module hash
|
module hash
|
||||||
|
|
||||||
pub interface Hash {
|
pub interface Hash {
|
||||||
|
mut:
|
||||||
// Sum appends the current hash to b and returns the resulting array.
|
// Sum appends the current hash to b and returns the resulting array.
|
||||||
// It does not change the underlying hash state.
|
// It does not change the underlying hash state.
|
||||||
sum(b []u8) []u8
|
sum(b []u8) []u8
|
||||||
size() int
|
size() int
|
||||||
block_size() int
|
block_size() int
|
||||||
|
free()
|
||||||
|
reset()
|
||||||
|
write(p []u8) !int
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Hash32er {
|
interface Hash32er {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue