Skip to content

Expose iterators in API #6

Description

@Kixunil

Instead of taking/returning slice/Vec<...> the functions could take impl Iterator<Item=[u8; 2]>/return impl Iterator<Item=...> so that callers that don't need Vec do not need to allocate at all. (E.g. this is the case if the user wants to just write out the passphrase.) Requiring Item=[u8; 2] also side steps the evenness check completely.

I think with these adjustments it should be possible to make whole crate allocation-free. The current methods can be kept for backwards compatibility or as helpers for people who don't want to mess with iterators

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions