From aa7ff75be71b89636bb233cfa1818112cb2384f6 Mon Sep 17 00:00:00 2001 From: Dave Hrycyszyn Date: Fri, 24 Jan 2020 16:29:02 +0000 Subject: [PATCH] mixnode: replaced base64 with base58 --- Cargo.lock | 2 +- mixnode/Cargo.toml | 2 +- mixnode/src/node/mod.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c7f39eb1ef..5f15a91993 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1382,7 +1382,7 @@ name = "nym-mixnode" version = "0.3.3" dependencies = [ "addressing", - "base64 0.11.0", + "bs58", "built", "clap", "curve25519-dalek", diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 52db3fa9b6..e7e7282f92 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -base64 = "0.11.0" +bs58 = "0.3.0" clap = "2.33.0" curve25519-dalek = "1.2.3" dotenv = "0.15.0" diff --git a/mixnode/src/node/mod.rs b/mixnode/src/node/mod.rs index c8ce9ae783..70f69ce80e 100644 --- a/mixnode/src/node/mod.rs +++ b/mixnode/src/node/mod.rs @@ -31,7 +31,7 @@ pub struct Config { impl Config { pub fn public_key_string(&self) -> String { let key_bytes = self.public_key.to_bytes().to_vec(); - base64::encode_config(&key_bytes, base64::URL_SAFE) + bs58::encode(&key_bytes).into_string() } } @@ -232,8 +232,7 @@ impl MixNode { let directory_cfg = directory_client::Config { base_url: self.directory_server.clone(), }; - let pub_key_str = - base64::encode_config(&self.public_key.to_bytes().to_vec(), base64::URL_SAFE); + let pub_key_str = bs58::encode(&self.public_key.to_bytes().to_vec()).into_string(); rt.spawn({ let presence_notifier = presence::Notifier::new(&config);