Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedisct1/rust-ct-codecs
Constant-time hex and base64 codecs from libsodium reimplemented in Rust.
https://github.com/jedisct1/rust-ct-codecs
base64 codecs constant-time crypto cryptography hex libhydrogen libsodium rust
Last synced: 1 day ago
JSON representation
Constant-time hex and base64 codecs from libsodium reimplemented in Rust.
- Host: GitHub
- URL: https://github.com/jedisct1/rust-ct-codecs
- Owner: jedisct1
- License: mit
- Created: 2020-03-23T22:05:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-30T07:26:34.000Z (3 months ago)
- Last Synced: 2024-11-07T06:04:36.643Z (9 days ago)
- Topics: base64, codecs, constant-time, crypto, cryptography, hex, libhydrogen, libsodium, rust
- Language: Rust
- Size: 20.5 KB
- Stars: 14
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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:
- [crates.io page](https://crates.io/crates/ct-codecs)
- [docs.rs page](https://docs.rs/ct-codecs)## Example usage
```rust
use ct_codecs::{Base64UrlSafe, Decoder, Encoder};let encoded = Base64UrlSafe::encode_to_string(x)?;
let decoded = Base64UrlSafe::decode_to_vec(encoded, None)?;
```