Hacker News new | ask | show | jobs
by bascule 2710 days ago
I think what you're after is:

https://docs.rs/miscreant/0.4.2/miscreant/aead/trait.Aead.ht...

These take a byte slice, and return an (allocated) byte vector.

The APIs you're talking about are special in-place ones for Miscreant's #![no_std] support, i.e. for embedded use or other usages which want to avoid heap allocations.

It's nice to support both of these usage patterns, because the allocating version has nicer ergonomics, but not everyone in the world has a heap.