]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/cipher: fix AEAD.Open documentation nit
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 4 Mar 2014 17:58:54 +0000 (09:58 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 4 Mar 2014 17:58:54 +0000 (09:58 -0800)
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

src/pkg/crypto/cipher/gcm.go

index 2f748f02f7ca8a4498d98633cb464d2819c836bf..bdafd85fc30db2f7afbdb9a919d7af39cd3037b3 100644 (file)
@@ -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)