* bump rust-crypto * initial version of account provider utilizing secret store * update lazy_static to latest version * AccountProvider accounts method * new AccountProvider tests in progress * basic tests for new AccountProvider * ethcore compiles with new account provider and secret store * ethcore-rpc build now compiling with new AccountProvider * most rpc tests passing with new accounts_provider * fixed basic_authority tests * fixed eth_transaction_count rpc test * fixed mocked/eth.rs tests * fixed personal tests * fixed personal signer rpc tests * removed warnings * parity compiling fine with new sstore * fixed import direction * do not unlock temporarily when we have the password * removed TODO in account import * display warning on auto account import failure * fixed compiling of ethstore on windows * ethstore as a part of parity repo * added ethkey
16 lines
310 B
Rust
16 lines
310 B
Rust
use tiny_keccak::Keccak;
|
|
|
|
pub trait Keccak256<T> {
|
|
fn keccak256(&self) -> T where T: Sized;
|
|
}
|
|
|
|
impl Keccak256<[u8; 32]> for [u8] {
|
|
fn keccak256(&self) -> [u8; 32] {
|
|
let mut keccak = Keccak::new_keccak256();
|
|
let mut result = [0u8; 32];
|
|
keccak.update(self);
|
|
keccak.finalize(&mut result);
|
|
result
|
|
}
|
|
}
|