ct-codecs

Crates.ioct-codecs
lib.rsct-codecs
version1.1.3
sourcesrc
created_at2020-03-23 22:08:21.346056
updated_at2024-12-09 11:54:46.944583
descriptionConstant-time hex and base64 codecs from libsodium reimplemented in Rust
homepagehttps://github.com/jedisct1/rust-ct-codecs
repositoryhttps://github.com/jedisct1/rust-ct-codecs
max_upload_size
id221933
size21,426
Frank Denis (jedisct1)

documentation

README

CT-Codecs

A reimplementation of the base64 and hexadecimal codecs from libsodium and libhydrogen in Rust.

  • Constant-time for a given length, suitable for cryptographic purposes
  • Strict (base64 strings are not malleable)
  • Supports padded and unpadded, original and URL-safe base64 variants
  • Supports characters to be ignored by the decoder
  • Zero dependencies, no_std friendly.

Links:

Example usage

use ct_codecs::{Base64UrlSafe, Decoder, Encoder};

let encoded = Base64UrlSafe::encode_to_string(x)?;
let decoded = Base64UrlSafe::decode_to_vec(encoded, None)?;
Commit count: 22

cargo fmt