vios_app 0.1.1

Small JSON vaults: Argon2id + AES-GCM, with optional AAD binding.
Documentation
// 🧬 reem.rs — Resonant Emotional Encoding Mechanism (REEM)

use std::collections::HashMap;

/// Generates a REEM Code from tone + intent
pub fn generate_reem_code(tone: &str, intent: &str) -> String {
    let map = get_reem_code_map();

    let tone_lc = tone.to_lowercase();
    let intent_lc = intent.to_lowercase();
    let key = (tone_lc.as_str(), intent_lc.as_str());

    let code = map.get(&key).unwrap_or(&"REEM-XX0").to_string();
    code
}

/// Static map of known tone+intent → REEM codes
fn get_reem_code_map() -> HashMap<(&'static str, &'static str), &'static str> {
    let mut map = HashMap::new();

    map.insert(("anger", "reflect"), "REEM-AF1");
    map.insert(("sadness", "grieve"), "REEM-BQ2");
    map.insert(("hope", "encourage"), "REEM-CR3");
    map.insert(("neutral", "log"), "REEM-DX4");

    map
}