base85rs

Crates.iobase85rs
lib.rsbase85rs
version0.1.3
sourcesrc
created_at2022-09-25 20:25:36.417153
updated_at2024-03-13 07:58:43.447822
descriptionA base85 (RFC1924 variant) encoder / decoder
homepage
repositoryhttps://github.com/YetiBarBar/base85rs
max_upload_size
id673796
size10,252
YetiBarBar (YetiBarBar)

documentation

https://docs.rs/base85rs/

README

base85rs

A library to encode and decode Base85 RFC1924 variant

Description

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.

Usage

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']));
Commit count: 6

cargo fmt