Sample code for 30+ languages & platforms
Rust

Example: Crypt2.DecodeString method

Demonstrates how to call the DecodeString method.

Chilkat Rust Downloads

Rust
let crypt2 = chilkat::Crypt2::new();

// The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="

let encoded_str = "SGVsbG8gV29ybGQ=".to_string();
let encoding = "base64".to_string();
let charset = "utf-8".to_string();

let str = crypt2.decode_string(&encoded_str, &charset, &encoding).unwrap_or_default();
println!("{}", str);

// Output is "Hello World"