Documentation
pub fn version() {
    println!("GOYYDS");
    println!("0.1.3");
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::crypto::hash::sha256_hash;
    use crate::crypto::aes::{aes_encrypt, aes_decrypt};

    #[test]
    fn test_sha256() {
        let hash = sha256_hash("hello");
        println!("SHA-256: {}", hash);
        assert_eq!(hash.len(), 64);
    }

    #[test]
    fn test_aes() {
        let key = [0u8; 32]; // 简单示例,不推荐生产用
        let nonce = [1u8; 12]; // AES-GCM 使用 12 字节的 nonce
        let plaintext = "hello rust";

        let ciphertext = aes_encrypt(&key, &nonce, plaintext).unwrap();
        println!("Encrypted: {:?}", ciphertext);

        let decrypted = aes_decrypt(&key, &nonce, &ciphertext).unwrap();
        println!("Decrypted: {}", decrypted);

        assert_eq!(decrypted, plaintext);
    }
}