stringencrypt 1.0.0

Official Rust client for the StringEncrypt.com Web API — generate polymorphic decryptors for many programming languages.
Documentation
///////////////////////////////////////////////////////////////////////////////
//
// StringEncrypt WebApi interface usage example.
//
// In this example we will verify our activation code status.
//
// Version        : v1.0.0
// Language       : Rust
// Author         : Bartosz Wójcik
// Project page   : https://www.stringencrypt.com
// Web page       : https://www.pelock.com
//
///////////////////////////////////////////////////////////////////////////////

use stringencrypt::StringEncrypt;

#[tokio::main]
async fn main() {
    let mut string_encrypt = StringEncrypt::new("", false); // leave empty for demo mode

    let result = string_encrypt.is_demo().await;

    let Some(result) = result else {
        println!("Cannot connect to the API.");
        std::process::exit(1);
    };

    if result.demo.unwrap_or(false) {
        println!("DEMO mode");
    } else {
        println!("FULL mode");
        println!("Credits left: {}", result.credits_left.unwrap_or(0));
    }

    println!("Label max length: {}", result.label_limit.unwrap_or(0));
    println!("String max length: {}", result.string_limit.unwrap_or(0));
    println!("Bytes max length: {}", result.bytes_limit.unwrap_or(0));
    println!(
        "cmd_min / cmd_max: {} / {}",
        result.cmd_min.unwrap_or(0),
        result.cmd_max.unwrap_or(0)
    );
}