Skip to content

Support Nix base32 #110

Open
Open
@griff

Description

@griff

Would supporting the variant of base32 that Nix uses be something you would consider?

It is like LeastSignificantFirst but reversed:

let mut spec = Specification::new();
spec.symbols.push_str("0123456789abcdfghijklmnpqrsvwxyz");
spec.bit_order = BitOrder::LeastSignificantFirst;
let encoding = spec.encoding().unwrap();
let mut actual = encoding.encode(&hex!("0839 7037 8635 6bca 59b0 f4a3 2987 eb2e 6de4 3ae8"));
unsafe { actual.as_bytes_mut() }.reverse();
assert_eq!("x0xf8v9fxf3jk8zln1cwlsrmhqvp0f88", actual);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions