CryptoUtil

This commit is contained in:
Alex Emmet 2026-07-03 16:43:29 +02:00
commit 912aa9491c
10 changed files with 153 additions and 35 deletions

View file

@ -0,0 +1,13 @@
use mtp::crypto::Keyring;
fn main() {
let keyring = Keyring::generate();
let bundle = keyring.public_key_bundle();
// The `Debug` impl redacts private keys by design, so use the encoding
// methods to emit the full keyring (public + secret keys) instead.
println!("Keyring (hex):\n{}\n", keyring.to_hex());
println!("Keyring (base64):\n{}\n", keyring.to_base64());
println!("PublicKeyBundle (base64):\n{}", bundle.to_base64());
}