caido-convert

Crates.iocaido-convert
lib.rscaido-convert
version1.2.1
sourcesrc
created_at2023-01-27 17:13:01.823029
updated_at2023-07-07 18:15:11.184386
descriptionEncoding library for web security applications
homepage
repositoryhttps://github.com/caido/convert
max_upload_size
id769804
size22,924
Caido Bot (caidobot)

documentation

README

👋 Convert

Welcome to caido convert package! This repo contains the code we use to encode, hash, zip and much more. This library focus on providing a decent API for diverse encoding need in a web application context. It is Grapheme aware when needed and tries to provide predictable encoding/decoding behavior.

Examples

Base64

fn main() {
  use caido_convert::{Base64Decode, Operation, Base64Encode};

  let encoder = Base64Decode::new();
  let decoded = encoder.execute("Y2FpZG8=".as_bytes()).unwrap();
  println!("{}", String::from_utf8(decoded).unwrap()); // caido

  let encoder = Base64Encode::new();
  let encoded = encoder.execute("caido".as_bytes()).unwrap();
  println!("{}", String::from_utf8(encoded).unwrap()); // Y2FpZG8=
}
Commit count: 58

cargo fmt