Constant-time hex and base64 codecs from libsodium reimplemented in Rust.
MIT License
A reimplementation of the base64 and hexadecimal codecs from libsodium and libhydrogen in Rust.
no_std
friendly.Links:
use ct_codecs::{Base64UrlSafe, Decoder, Encoder};
let encoded = Base64UrlSafe::encode_to_string(x)?;
let decoded = Base64UrlSafe::decode_to_vec(encoded, None)?;