| Crates.io | basenc |
| lib.rs | basenc |
| version | 0.2.3 |
| created_at | 2016-12-01 14:45:10.372738+00 |
| updated_at | 2025-09-13 11:07:33.058346+00 |
| description | Encoding and decoding hex, base64 and base32 with support for #[no_std]. |
| homepage | |
| repository | https://github.com/CasualX/basenc |
| max_upload_size | |
| id | 7428 |
| size | 88,258 |
Pronounced "Base-En-See".
Encoding and decoding hex, base64 and base32 with support for #[no_std].
Encoding:
let encoded = basenc::Base64Std.encode(b"hello world");
assert_eq!(encoded, "aGVsbG8gd29ybGQ");
Decoding:
let decoded = basenc::Base64Std.decode("aGVsbG8gd29ybGQ=").unwrap();
assert_eq!(decoded, b"hello world");
std (default) - Enable support for the standard library, including convenient encoding/decoding to String and Vec<u8>.
simd-off - Disable SIMD acceleration. (The SIMD paths are less tested and may contain bugs.)
simd-runtime - Enable runtime detection of SIMD support. This is on by default, and will automatically use SIMD acceleration when available.
Tip: Build with RUSTFLAGS="-C target-cpu=native" (bash) or set RUSTFLAGS=-C target-cpu=native (cmd) to enable compiletime detection.
Licensed under MIT License, see license.txt.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.