Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Bad API design for aes-gcm
Hi everyone.
Has anyone here worked with aes-gcm? As far as I understand, when using encrypt_in_place
/ decrypt_in_place
, Iโm required to implement the Buffer
trait only because the library canโt tell in advance whether thereโs enough space for the authentication tag during encryption.
Isnโt that just bad design? It forces me to inject a buffer pool into the object implementing Buffer
, just to avoid unnecessary allocations - instead of simply allowing me to pass a &mut [u8] with enough capacity upfront.
1 post - 1 participant
๐ท๏ธ rust_feed