#convert #applications #web-apps #welcome #package #cyware

cyware-convert

Encoding library for web security applications

1 stable release

1.0.6 May 31, 2024

#612 in Encoding

Download history 191/week @ 2024-05-27 17/week @ 2024-06-03 9/week @ 2024-06-10

217 downloads per month

MIT license

23KB
625 lines

👋 Convert

Welcome to cyware 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 cyware_convert::{Base64Decode, Operation, Base64Encode};

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

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

Dependencies

~1.5–2.3MB
~47K SLoC