Crates.io | ub64 |
lib.rs | ub64 |
version | 0.0.10 |
source | src |
created_at | 2023-08-19 00:27:05.720788 |
updated_at | 2023-08-19 00:51:26.688521 |
description | urlsafe base64 encode / decode |
homepage | https://github.com/xxai-art/ub64 |
repository | https://github.com/xxai-art/ub64 |
max_upload_size | |
id | 948423 |
size | 10,294 |
use ub64::{b64_u64, b64d, b64e, u64_b64};
#[test]
fn main() {
let bin = [1, 2, 3];
let b64 = b64e(bin);
dbg!(&b64);
dbg!(b64d(b64).unwrap());
let n = 9876543210;
let u64_b64 = u64_b64(n);
dbg!(&u64_b64);
dbg!(b64_u64(u64_b64));
}
run
+ cargo test --all-features -- --nocapture
Running tests/main.rs (target/debug/deps/main-8af48d1761c45bbe)
[tests/main.rs:7] &b64 = "AQID"
[tests/main.rs:8] b64d(b64).unwrap() = [
1,
2,
3,
]
[tests/main.rs:11] &u64_b64 = "6hawTAI"
[tests/main.rs:12] b64_u64(u64_b64) = 9876543210