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

crypto.sha256: add missing documentation of sum (#12716)

This commit is contained in:
Taillook 2021-12-05 03:16:44 +09:00 committed by GitHub
parent 81a1490e31
commit 4b21d3e364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,7 @@ fn (mut d Digest) write(p_ []byte) ?int {
}
}
// sum returns the SHA256 or SHA224 checksum of digest with the data.
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