mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
Use sha3 in monero-generators
This commit is contained in:
parent
2b7c9378c0
commit
8da0743361
3 changed files with 4 additions and 8 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -4579,8 +4579,8 @@ dependencies = [
|
|||
"dalek-ff-group",
|
||||
"group",
|
||||
"lazy_static",
|
||||
"sha3 0.10.5",
|
||||
"subtle",
|
||||
"tiny-keccak",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -15,7 +15,7 @@ lazy_static = "1"
|
|||
|
||||
subtle = "2.4"
|
||||
|
||||
tiny-keccak = { version = "2", features = ["keccak"] }
|
||||
sha3 = "0.10"
|
||||
|
||||
curve25519-dalek = { version = "3", features = ["std"] }
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use tiny_keccak::{Hasher, Keccak};
|
||||
use sha3::{Digest, Keccak256};
|
||||
|
||||
use curve25519_dalek::{
|
||||
constants::ED25519_BASEPOINT_POINT,
|
||||
|
@ -21,11 +21,7 @@ mod hash_to_point;
|
|||
pub use hash_to_point::hash_to_point;
|
||||
|
||||
fn hash(data: &[u8]) -> [u8; 32] {
|
||||
let mut keccak = Keccak::v256();
|
||||
keccak.update(data);
|
||||
let mut res = [0; 32];
|
||||
keccak.finalize(&mut res);
|
||||
res
|
||||
Keccak256::digest(data).into()
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
|
|
Loading…
Reference in a new issue