From: Brad Fitzpatrick Date: Tue, 4 Mar 2014 17:58:54 +0000 (-0800) Subject: crypto/cipher: fix AEAD.Open documentation nit X-Git-Tag: go1.3beta1~487 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c7157bf44926f489c5db1c830748d9072d17852f;p=gostls13.git crypto/cipher: fix AEAD.Open documentation nit It mentioned true and false for error values. Instead, just don't mention the error semantics, as they match normal Go conventions (if error is non-nil, the other value is meaningless). We generally only document error values when they're interesting (where non-nil, non-nil is valid, or the error value can be certain known values or types). Fixes #7464 LGTM=agl R=agl CC=golang-codereviews https://golang.org/cl/68440044 --- diff --git a/src/pkg/crypto/cipher/gcm.go b/src/pkg/crypto/cipher/gcm.go index 2f748f02f7..bdafd85fc3 100644 --- a/src/pkg/crypto/cipher/gcm.go +++ b/src/pkg/crypto/cipher/gcm.go @@ -30,9 +30,9 @@ type AEAD interface { // Open decrypts and authenticates ciphertext, authenticates the // additional data and, if successful, appends the resulting plaintext - // to dst, returning the updated slice and true. On error, nil and - // false is returned. The nonce must be NonceSize() bytes long and both - // it and the additional data must match the value passed to Seal. + // to dst, returning the updated slice. The nonce must be NonceSize() + // bytes long and both it and the additional data must match the + // value passed to Seal. // // The ciphertext and dst may alias exactly or not at all. Open(dst, nonce, ciphertext, data []byte) ([]byte, error)