Skip to content

Commit

Permalink
fix: remove tari_common dep from keymanager (#4335)
Browse files Browse the repository at this point in the history
Description
---
- removes tari_common dependency from the key manager
- remove (unused) `key_manager_hash_domain` function

Motivation and Context
---
Quick fix to fix CI WASM tests as `fs2` does not support the WASM target.
Suggest moving hashing domain into its own crate.


A hardcoded domain for all keys within key manager is likely not correct and should be specified by the caller e.g. independent KeyManager domain for wallet etc.
  • Loading branch information
sdbondi committed Jul 22, 2022
1 parent dba167b commit 5e3797f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion base_layer/key_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ crate-type = ["lib", "cdylib"]

[dependencies]
tari_common_types = { version = "^0.34", path = "../../base_layer/common_types" }
tari_common = {path = "../../common"}
tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", tag = "v0.15.0" }
tari_utilities = { git = "https://github.com/tari-project/tari_utilities.git", tag = "v0.4.4" }

Expand Down
10 changes: 0 additions & 10 deletions base_layer/key_manager/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright 2022 The Tari Project
// SPDX-License-Identifier: BSD-3-Clause

use tari_common::hashing_domain::HashingDomain;

pub mod cipher_seed;
pub mod diacritics;
pub mod error;
Expand All @@ -13,11 +11,3 @@ pub mod mnemonic_wordlists;
#[allow(clippy::unused_unit)]
#[cfg(feature = "wasm")]
pub mod wasm;

/// The base layer key manager domain separated hashing domain
/// Usage:
/// let hash = key_manager_hash_domain().digest::<Blake256>(b"my secret");
/// etc.
pub fn key_manager_hash_domain() -> HashingDomain {
HashingDomain::new("base_layer.key_manager")
}

0 comments on commit 5e3797f

Please sign in to comment.