Commit c7157bf4 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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
parent 96c373f9
...@@ -30,9 +30,9 @@ type AEAD interface { ...@@ -30,9 +30,9 @@ type AEAD interface {
// Open decrypts and authenticates ciphertext, authenticates the // Open decrypts and authenticates ciphertext, authenticates the
// additional data and, if successful, appends the resulting plaintext // additional data and, if successful, appends the resulting plaintext
// to dst, returning the updated slice and true. On error, nil and // to dst, returning the updated slice. The nonce must be NonceSize()
// false is returned. The nonce must be NonceSize() bytes long and both // bytes long and both it and the additional data must match the
// it and the additional data must match the value passed to Seal. // value passed to Seal.
// //
// The ciphertext and dst may alias exactly or not at all. // The ciphertext and dst may alias exactly or not at all.
Open(dst, nonce, ciphertext, data []byte) ([]byte, error) Open(dst, nonce, ciphertext, data []byte) ([]byte, error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment