aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/rsa/rsa.go
diff options
context:
space:
mode:
authorRichard Pickering <richard.pickering@hotmail.co.uk>2021-03-15 18:16:05 +0000
committerRobert Findley <rfindley@google.com>2021-03-18 13:31:52 +0000
commit9de49ae01ad332d8cbb79a3094c3fc3d6b6931e6 (patch)
tree97094cd98db43521197a7cf57d99a7b573594b1d /src/crypto/rsa/rsa.go
parent732ea4c2dcc1bcbcff65c31047ebb54364e7865d (diff)
downloadgo-9de49ae01ad332d8cbb79a3094c3fc3d6b6931e6.tar.gz
go-9de49ae01ad332d8cbb79a3094c3fc3d6b6931e6.zip
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: ea28663f8719e8fd0dcb10cf97ffbdcf4bd9674f GitHub-Pull-Request: golang/go#45032 Reviewed-on: https://go-review.googlesource.com/c/go/+/301714 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Trust: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/crypto/rsa/rsa.go')
-rw-r--r--src/crypto/rsa/rsa.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/rsa/rsa.go b/src/crypto/rsa/rsa.go
index 178ade666a..6fd59b3940 100644
--- a/src/crypto/rsa/rsa.go
+++ b/src/crypto/rsa/rsa.go
@@ -401,7 +401,7 @@ func encrypt(c *big.Int, pub *PublicKey, m *big.Int) *big.Int {
//
// The label parameter may contain arbitrary data that will not be encrypted,
// but which gives important context to the message. For example, if a given
-// public key is used to decrypt two types of messages then distinct label
+// public key is used to encrypt two types of messages then distinct label
// values could be used to ensure that a ciphertext for one purpose cannot be
// used for another by an attacker. If not required it can be empty.
//