Skip to content

Prefer &mut [u8] over returning a newly allocated Vec<u8>; derive the latter from the former #56

Description

@WildCryptoFox

#[no_std] is already common between these crates but when they pull in alloc for Vec, and always allocate, you lose the ability to reuse allocations between calls.

At least an _in_place.

Activity

  1. newpavlov commented on Sep 3, 2019

    @newpavlov
    Member

    Are you talking about the aead crate? We had a very lengthy discussion about non-allocating API. So we decided to start with a simple non-controversial allocating API and add non-allocating methods later.

  2. WildCryptoFox commented on Sep 3, 2019

    @WildCryptoFox
    Author

    @newpavlov I am, though I didn't want to discriminate against other cases where it may apply too. Thanks for the link. Later is fine.

  3. tarcieri commented on Sep 3, 2019

    @tarcieri
    Member

    I've been meaning to submit a follow-up PR with my thoughts as I'd like to address the in-place API before moving Miscreant over to the traits in the aead crate

  4. tarcieri commented on May 23, 2020

    @tarcieri
    Member

    We added in-place APIs to the aead crate in #58 and #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions