nix-base32

Crates.ionix-base32
lib.rsnix-base32
version0.2.0
sourcesrc
created_at2019-11-29 20:45:10.504195
updated_at2024-08-23 16:20:06.761906
descriptionProvides a nix (as in NixOS) compatible base32 encoding.
homepage
repositoryhttps://github.com/kolloch/nix-base32
max_upload_size
id185390
size16,042
Peter Kolloch (kolloch)

documentation

README

nix-base32

Crate

This crate implements conversion between a [u8] slice and its Nix-specific base32 representation. SHA256 hash codes in nix are usually encoded in base32 with an unusual set of characters (without E O U T).

    assert_eq!(
        to_nix_base32(
            &hex::decode("ab335240fd942ab8191c5e628cd4ff3903c577bda961fb75df08e0303a00527b")
                .unwrap()
        ),
        "0ysj00x31q08vxsznqd9pmvwa0rrzza8qqjy3hcvhallzm054cxb"
    );
Commit count: 8

cargo fmt