Skip to content
Snippets Groups Projects
Commit 8613b91a authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Add comment to comply with new rules around Sum function

parent 6d5e23a8
No related branches found
No related tags found
No related merge requests found
...@@ -286,6 +286,9 @@ func mgf1XOR(out []byte, hash hash.Hash, seed []byte) { ...@@ -286,6 +286,9 @@ func mgf1XOR(out []byte, hash hash.Hash, seed []byte) {
for done < len(out) { for done < len(out) {
hash.Write(seed) hash.Write(seed)
hash.Write(counter[0:4]) hash.Write(counter[0:4])
// NOTE: while `.Sum(data)` pattern is banned in the xx network
// codebase, this is a copy from golang's `crypto/rsa/rsa.go`,
// so we will leave it as-is.
digest = hash.Sum(digest[:0]) digest = hash.Sum(digest[:0])
hash.Reset() hash.Reset()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment