From: Pasha Radchenko Date: Thu, 6 Feb 2025 18:42:28 +0000 (+0000) Subject: crypto/aes: more precise description for AES keys requirements X-Git-Tag: go1.25rc1~1112 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=472d2859066d98961b5a7f09556f6bd7ca216701;p=gostls13.git crypto/aes: more precise description for AES keys requirements The existing documentation is not certain in the place regarding requirements about AES key. Added some notes for precise description. Change-Id: I190562ab7c1566cce8e7771f9927d738c72880ce GitHub-Last-Rev: 6565a8f4e5b37220fd14d55e876b809b2d763b7c GitHub-Pull-Request: golang/go#71589 Reviewed-on: https://go-review.googlesource.com/c/go/+/647336 LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Jorropo Auto-Submit: Jorropo Reviewed-by: Roland Shoemaker --- diff --git a/src/crypto/aes/aes.go b/src/crypto/aes/aes.go index 5bc2d13d67..22ea8819ed 100644 --- a/src/crypto/aes/aes.go +++ b/src/crypto/aes/aes.go @@ -30,7 +30,7 @@ func (k KeySizeError) Error() string { } // NewCipher creates and returns a new [cipher.Block]. -// The key argument should be the AES key, +// The key argument must be the AES key, // either 16, 24, or 32 bytes to select // AES-128, AES-192, or AES-256. func NewCipher(key []byte) (cipher.Block, error) {