mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-10 16:11:30 +01:00
feat: add support for hashmaps in Smt and SimpleSmt (#363)
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
use alloc::string::String;
|
||||
use core::{cmp::Ordering, fmt::Display, ops::Deref, slice};
|
||||
use core::{
|
||||
cmp::Ordering,
|
||||
fmt::Display,
|
||||
hash::{Hash, Hasher},
|
||||
ops::Deref,
|
||||
slice,
|
||||
};
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -55,6 +61,12 @@ impl RpoDigest {
|
||||
}
|
||||
}
|
||||
|
||||
impl Hash for RpoDigest {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
state.write(&self.as_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
impl Digest for RpoDigest {
|
||||
fn as_bytes(&self) -> [u8; DIGEST_BYTES] {
|
||||
let mut result = [0; DIGEST_BYTES];
|
||||
|
||||
Reference in New Issue
Block a user