|
@@ -0,0 +1,15 @@
|
|
|
+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");
|
|
|
+}
|