diff --git a/util/hash/Cargo.toml b/util/hash/Cargo.toml index 5cf389749b..9cad6007c5 100644 --- a/util/hash/Cargo.toml +++ b/util/hash/Cargo.toml @@ -9,14 +9,14 @@ homepage = "https://github.com/nervosnetwork/ckb" repository = "https://github.com/nervosnetwork/ckb" [features] -default = ["blake2b-wasm", "blake2b-native"] -ckb-contract = ["blake2b-wasm"] # This feature is used for CKB contract development +default = ["blake2b-ref", "blake2b-rs"] +ckb-contract = ["blake2b-ref"] # This feature is used for CKB contract development [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -blake2b-native = {package="blake2b-rs", version = "0.2", optional = true} +blake2b-rs = { version = "0.2", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] -blake2b-wasm = { package="blake2b-ref", version = "0.3", optional = true} +blake2b-ref = { version = "0.3", optional = true } [dependencies] -blake2b-wasm = { package="blake2b-ref", version = "0.3", optional = true} +blake2b-ref = { version = "0.3", optional = true } diff --git a/util/hash/src/lib.rs b/util/hash/src/lib.rs index ddf3fc4ae3..b988f041f5 100644 --- a/util/hash/src/lib.rs +++ b/util/hash/src/lib.rs @@ -10,13 +10,13 @@ #![no_std] #[cfg(feature = "ckb-contract")] -pub use blake2b_wasm::{Blake2b, Blake2bBuilder}; +pub use blake2b_ref::{Blake2b, Blake2bBuilder}; #[cfg(all(not(feature = "ckb-contract"), target_arch = "wasm32"))] -pub use blake2b_wasm::{Blake2b, Blake2bBuilder}; +pub use blake2b_ref::{Blake2b, Blake2bBuilder}; #[cfg(all(not(feature = "ckb-contract"), not(target_arch = "wasm32")))] -pub use blake2b_native::{Blake2b, Blake2bBuilder}; +pub use blake2b_rs::{Blake2b, Blake2bBuilder}; #[doc(hidden)] pub const BLAKE2B_KEY: &[u8] = &[];