1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

crypto/sha256: make digest sum public (#10047)

This commit is contained in:
Leigh McCulloch
2021-05-08 03:14:37 -07:00
committed by GitHub
parent 600017d7fe
commit cba2cb6b9c
2 changed files with 10 additions and 1 deletions

View File

@@ -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()