mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
crypto/sha256: make digest sum public (#10047)
This commit is contained in:
parent
600017d7fe
commit
cba2cb6b9c
2 changed files with 10 additions and 1 deletions
|
@ -124,7 +124,7 @@ fn (mut d Digest) write(p_ []byte) ?int {
|
|||
}
|
||||
}
|
||||
|
||||
fn (d &Digest) sum(b_in []byte) []byte {
|
||||
pub fn (d &Digest) sum(b_in []byte) []byte {
|
||||
// Make a copy of d so that caller can keep writing and summing.
|
||||
mut d0 := *d
|
||||
hash := d0.checksum()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue