Skip to content

Minor update to AES-GCM encrypt example.#111

Open
ggpslop wants to merge 1 commit intoOWASP:developfrom
ggpslop:develop
Open

Minor update to AES-GCM encrypt example.#111
ggpslop wants to merge 1 commit intoOWASP:developfrom
ggpslop:develop

Conversation

@ggpslop
Copy link
Copy Markdown

@ggpslop ggpslop commented Apr 18, 2026

Updated the AES-GCM encrypt function to avoid one heap memory allocation. The internal GCM implementation uses 'sliceForAppend' that will allocate new memory if the 'dst' buffer does not have enough capacity. With this fix, the slice 'nonce' has now enough capacity to be used as 'dst' without memory re-allocation.

Updated the AES-GCM encrypt function to avoid one heap memory allocation.
The internal GCM implementation uses 'sliceForAppend' that will allocate new memory if the 'dst' buffer does not have enough capacity. With this fix, the slice 'nonce' has now enough capacity to be used as 'dst' without memory re-allocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant