1
0
mirror of https://github.com/golang/go synced 2024-11-22 05:34:39 -07:00

crypto/cipher: update documentation for aead Open

The remaining capacity of dst should not overlap ciphertext.
The previous wording was probably a copy paste mistake from aead Seal.
This commit is contained in:
komuw 2024-08-28 16:59:37 +03:00
parent e126129d76
commit fb54bc84c4

View File

@ -39,7 +39,7 @@ type AEAD interface {
// value passed to Seal.
//
// To reuse ciphertext's storage for the decrypted output, use ciphertext[:0]
// as dst. Otherwise, the remaining capacity of dst must not overlap plaintext.
// as dst. Otherwise, the remaining capacity of dst must not overlap ciphertext.
//
// Even if the function fails, the contents of dst, up to its capacity,
// may be overwritten.