Reorganize repo to Rust format
This commit is contained in:
parent
aa7fae385c
commit
b945051c47
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "bridge_auth"
|
||||
name = "lox_test"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[package]
|
||||
name = "bridgedb"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
lox = { git = "https://git-crysp.uwaterloo.ca/iang/lox.git" }
|
|
@ -8,7 +8,7 @@ use std::io::Write;
|
|||
fn main() {
|
||||
// import bridgedb pubkey
|
||||
// note: currently no checks for valid data
|
||||
let infile = std::fs::File::open("../pubkeys/bridgedb_pubkey").unwrap();
|
||||
let infile = std::fs::File::open("bridgedb_pubkey").unwrap();
|
||||
let mut reader = BufReader::new(infile);
|
||||
let mut buffer = Vec::new();
|
||||
reader
|
||||
|
@ -28,7 +28,7 @@ fn main() {
|
|||
count += 1;
|
||||
let pubkey_bytes = pubkey.compress().to_bytes();
|
||||
// Is this the proper way to concatenate an integer and a string?
|
||||
let mut outfile = File::create(format!("{}{}", "../pubkeys/bridge_auth_pubkey_", count))
|
||||
let mut outfile = File::create(format!("bridge_auth_pubkey_{}", count))
|
||||
.expect("Failed to create pubkey file");
|
||||
outfile
|
||||
.write_all(&pubkey_bytes)
|
|
@ -9,7 +9,7 @@ fn main() {
|
|||
// 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");
|
||||
File::create("bridgedb_pubkey").expect("Failed to create pubkey file");
|
||||
outfile.write_all(&pubkey_bytes)
|
||||
.expect("Failed to write pubkey");
|
||||
}
|
Loading…
Reference in New Issue