CryptoUtil
This commit is contained in:
parent
1efcb8837c
commit
912aa9491c
10 changed files with 153 additions and 35 deletions
13
example/keygen/src/main.rs
Normal file
13
example/keygen/src/main.rs
Normal 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());
|
||||
}
|
||||
Loading…
Reference in a new issue