Skip to content

Commit 9de49ae

Browse files
rpickzfindleyr
authored andcommitted
crypto/rsa: correct EncryptOAEP doc comment
Fixes #44777 Corrected the documentation comment on the EncryptOAEP function from 'if a given public key is used to decrypt two types of messages' to 'if a given public key is used to encrypt two types of messages'. Change-Id: I02aff90d0414960eae72352c0e4d8ba2e8f8eca6 GitHub-Last-Rev: ea28663 GitHub-Pull-Request: #45032 Reviewed-on: https://go-review.googlesource.com/c/go/+/301714 Reviewed-by: Filippo Valsorda <[email protected]> Run-TryBot: Filippo Valsorda <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Robert Findley <[email protected]>
1 parent 732ea4c commit 9de49ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/crypto/rsa/rsa.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ func encrypt(c *big.Int, pub *PublicKey, m *big.Int) *big.Int {
401401
//
402402
// The label parameter may contain arbitrary data that will not be encrypted,
403403
// but which gives important context to the message. For example, if a given
404-
// public key is used to decrypt two types of messages then distinct label
404+
// public key is used to encrypt two types of messages then distinct label
405405
// values could be used to ensure that a ciphertext for one purpose cannot be
406406
// used for another by an attacker. If not required it can be empty.
407407
//

0 commit comments

Comments
 (0)