INNER CODE UNIT · Rust

print_new_identity

str4d/rage · age-plugin/src/lib.rs:198

pub fn print_new_identity(plugin_name: &str, identity: &[u8], recipient: &[u8]) {
    let mut identity_lower = bech32_encode(
        Hrp::parse_unchecked(&format!("{PLUGIN_IDENTITY_PREFIX}{plugin_name}-")),
        identity,
    );

    println!(
        "# created: {}",
        chrono::Local::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true)
    );
    println!(
        "# recipient: {}",
        bech32_encode(
            Hrp::parse_unchecked(&format!("{PLUGIN_RECIPIENT_PREFIX}{plugin_name}")),
            recipient,
        )
    );
    println!("{}", identity_lower.to_uppercase());

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…