mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 22:51:13 +00:00
Introduce better hashing.
- Blake2 for secure hashing - XX for fast hashing
This commit is contained in:
@@ -11,5 +11,4 @@ lazy_static = "1.0.0"
|
||||
parking_lot = "0.5"
|
||||
polkadot-state-machine = { path = "../../state_machine" , version = "0.1" }
|
||||
environmental = { path = "../../environmental", version = "0.1.0" }
|
||||
tiny-keccak = "1.3"
|
||||
polkadot-primitives = { path = "../../primitives", version = "0.1.0" }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#[macro_use]
|
||||
extern crate environmental;
|
||||
extern crate polkadot_state_machine;
|
||||
extern crate tiny_keccak;
|
||||
extern crate polkadot_primitives as primitives;
|
||||
|
||||
use std::fmt;
|
||||
@@ -76,7 +75,7 @@ pub fn chain_id() -> u64 {
|
||||
}
|
||||
|
||||
/// Conduct a Keccak-256 hash of the given data.
|
||||
pub use tiny_keccak::keccak256;
|
||||
pub use primitives::{blake2_256, twox_128, twox_256};
|
||||
|
||||
/// Verify a ed25519 signature.
|
||||
pub fn ed25519_verify(sig: &[u8; 64], msg: &[u8], pubkey: &[u8; 32]) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user