-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Description
Go version
go1.25.2
Output of go env in your module/workspace:
specific version of Go or env is not relevant; comment has been unchanged for a long time.What did you do?
I would like to be able to write:
aead, err := chacha20poly1305.NewX()
plaintext := []byte("hello, world")
dst := make([]byte, 0, 26+len(plaintext)+16)
dst[0] = 'a'
dst[1] = 'D'
rand.Read(dst[2:26])
dst = aead.Seal(dst, dst[2:26], plaintext, dst[0:2])
What did you see happen?
This does seem to work for the library AEAD versions.
What did you expect to see?
But the comment in type AEAD says dst and additionalData may not overlap.
Ok to change this to On input, dst[len(dst):cap(dst)] and additionalData may not overlap.?
Metadata
Metadata
Assignees
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.