From 8613b91a6923653370f0adf1f9ec91dc67198cfa Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Tue, 5 Dec 2023 19:43:38 +0000
Subject: [PATCH] Add comment to comply with new rules around Sum function

---
 multicastRSA/oaep.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/multicastRSA/oaep.go b/multicastRSA/oaep.go
index 771c6c5..39679b8 100644
--- a/multicastRSA/oaep.go
+++ b/multicastRSA/oaep.go
@@ -286,6 +286,9 @@ func mgf1XOR(out []byte, hash hash.Hash, seed []byte) {
 	for done < len(out) {
 		hash.Write(seed)
 		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])
 		hash.Reset()
 
-- 
GitLab