Skip to content

Commit ea28663

Browse files
committed
crypto/rsa: EncryptOAEP doc comment correction
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'.
1 parent 8ac6544 commit ea28663

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)