]> Cypherpunks repositories - gostls13.git/commitdiff
doc: fix Block interface parameters order
authorAlberto Donizetti <alb.donizetti@gmail.com>
Fri, 2 Aug 2019 17:09:20 +0000 (19:09 +0200)
committerAlberto Donizetti <alb.donizetti@gmail.com>
Fri, 2 Aug 2019 17:51:34 +0000 (17:51 +0000)
The Effective Go document references the crypto/cipher Block
interface, but the parameters' names are swapped. This change
alignes them to the crypto definition, to avoid confusion.

Fixes #33432

Change-Id: I8b9aac4dc6af3eec968bbc8f3ee5366b99016fcc
Reviewed-on: https://go-review.googlesource.com/c/go/+/188797
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/effective_go.html

index 7bb60a0786542758bf406a374592045b809b26b7..158f39ebc894fcdb9a11995c1a4c2d69723fae68 100644 (file)
@@ -2282,8 +2282,8 @@ The  <code>crypto/cipher</code> interfaces look like this:
 <pre>
 type Block interface {
     BlockSize() int
-    Encrypt(src, dst []byte)
-    Decrypt(src, dst []byte)
+    Encrypt(dst, src []byte)
+    Decrypt(dst, src []byte)
 }
 
 type Stream interface {