Skip to content

Add saltpack's baseX family of codecs #17

Description

@jpetso

See https://saltpack.org/armoring for the specification. Should be a fun exercise as follow-up to adding Base85, since the calculation (and differences from currently implemented codecs) is largely the same.

It seems the alphabet and binary block size should be passed as template arguments.

For the calculation of encoded/decoded sizes, in case the current calculation isn't synonymous with their "most direct way to compute [it]", we could use log2() from https://github.com/elbeno/constexpr. I'll have to check whether it is synonymous.

For block sizes > 8 bytes, a bignum library will be necessary. I'm thinking we should probably statically assert in this case if included without an extra bignum library, and use a specialized template (that doesn't assert) otherwise. We can provide an extra header to provide that specialized template, avoiding to e.g. hardcode a boost dependency in the main header.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions