entropy_test 0.0.1

CLI tool and API to generate passphrases
Documentation
// GOAL: command line app
// - arg1: entropy (activates the app)
// - arg2: mode (level of difficulty)
//
// STRETCH GOAL: optional args
// - toggle random CAPS on/off
// - padding types to exclude (nums, symbols, letters)
// - user provided alphabets to use for passphrase generation
//
// STRETCH GOAL 2: fn to calculate entropy
// - as param along with passphrase generation
// - for any arbitrary piece of data

extern crate entropy_test;
use entropy_test::*;
use std::env;


fn main() {
    
    // collect input from user
    let args: Vec<String> = env::args().collect();

    // determine difficulty mode
    let mode = &args[1];
    //let mode = "medium"; // easy, medium, hard, random
    
    // determine padding type
    let padding = join_padding_types(NUMS.to_vec(), SYMBOLS.to_vec(), LETTERS.to_vec(), OTHER.to_vec());

    // Create passphrase and password
    let _passphrase = passphrase(WORDS.to_vec().clone(), padding.clone(), mode);
    let _password = password(padding.clone(), _passphrase.len() as i32);

    // Print results for comparison
    println!("\nWhich is easier to remember?\n");
    println!("length: {}", _password.len());
    println!("password: {}", _password);
    println!("or...");
    println!("length: {}", _passphrase.len());
    println!("passphrase: {}\n", _passphrase);

}