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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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()