Expand description
Some common encoding algorithms.
§Examples
§Encoding
use ncr::encoding::{Base64Encoding, Encoding};
let decoded = "#%Hello, world!";
let encoded = Base64Encoding::encode(decoded.as_bytes());
assert_eq!(encoded, "IyVIZWxsbywgd29ybGQh");§Decoding
use ncr::encoding::{Base64Encoding, Encoding};
let encoded = "IyVIZWxsbywgd29ybGQh";
let decoded = Base64Encoding::decode(encoded).unwrap();
assert_eq!(String::from_utf8(decoded).unwrap(), "#%Hello, world!");Structs§
- Base64
Encoding - The base64 encoding.
- Base64r
Encoding - The base64r encoding, made by No Chat Reports.
- Mc256
Encoding - The mc256 encoding, made by Sharp5s.
- NewBase64r
Encoding - The new base64r encoding, made by No Chat Reports.
- Sus16
Encoding - The sus16 encoding, made by EnderKill98.
Traits§
- Encoding
- The encoding trait.