lox_cli/bridgedb/src/main.rs

16 lines
446 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 =
File::create("../pubkeys/bridgedb_pubkey").expect("Failed to create pubkey file");
outfile.write_all(&pubkey_bytes)
.expect("Failed to write pubkey");
}