Crates.io | base85rs |
lib.rs | base85rs |
version | 0.1.3 |
source | src |
created_at | 2022-09-25 20:25:36.417153 |
updated_at | 2024-03-13 07:58:43.447822 |
description | A base85 (RFC1924 variant) encoder / decoder |
homepage | |
repository | https://github.com/YetiBarBar/base85rs |
max_upload_size | |
id | 673796 |
size | 10,252 |
A library to encode and decode Base85 RFC1924 variant
This is only one variant of Base85, not the most common one (ASCII-85 and Z85 are wider spread). This variant will most likely been seen in CTF challenges.
During decoding, whitespaces are ignored.
To encode data:
let data = [b'a'];
let encoded = base85rs::encode(&data);
assert_eq!(encoded, "VE");
To decode data:
let data = "VE";
let decoded = base85rs::decode(&data);
assert_eq!(decoded, Some(vec![b'a']));