diff --git a/bridge_auth/Cargo.toml b/Cargo.toml similarity index 91% rename from bridge_auth/Cargo.toml rename to Cargo.toml index d825e2f..9efde86 100644 --- a/bridge_auth/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "bridge_auth" +name = "lox_test" version = "0.1.0" edition = "2021" diff --git a/bridgedb/Cargo.toml b/bridgedb/Cargo.toml deleted file mode 100644 index 862fbc0..0000000 --- a/bridgedb/Cargo.toml +++ /dev/null @@ -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" } diff --git a/bridge_auth/src/main.rs b/src/bin/bridge_auth.rs similarity index 86% rename from bridge_auth/src/main.rs rename to src/bin/bridge_auth.rs index cbdc640..5346269 100644 --- a/bridge_auth/src/main.rs +++ b/src/bin/bridge_auth.rs @@ -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) diff --git a/bridgedb/src/main.rs b/src/bin/bridgedb.rs similarity index 79% rename from bridgedb/src/main.rs rename to src/bin/bridgedb.rs index bf16366..c2eafce 100644 --- a/bridgedb/src/main.rs +++ b/src/bin/bridgedb.rs @@ -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"); }