lox_cli/src/bin/bridgedb.rs

16 lines
435 B
Rust
Raw Normal View History

use lox::BridgeDb;
use std::fs::File;
use std::io::Write;
fn main() {
// create new bridgedb (implicitly generates keys)
let bridgedb = BridgeDb::new();
// output public key to new file
let pubkey_bytes = bridgedb.pubkey.to_bytes();
let mut outfile =
2022-10-28 13:57:48 -04:00
File::create("bridgedb_pubkey").expect("Failed to create pubkey file");
outfile.write_all(&pubkey_bytes)
.expect("Failed to write pubkey");
}