Skip to content

Commit d89c6b4

Browse files
committed
Merge
1 parent 78809a5 commit d89c6b4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

common/src/hash.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ impl HashSecret {
5353
fix_sentinel(mod_int(self.hash_one(data) as _))
5454
}
5555

56+
pub fn hash_integer<T>(&self, data: T) -> PyHash
57+
where
58+
T: Into<BigInt>,
59+
{
60+
let bigint = data.into();
61+
let result = hash_bigint(&bigint);
62+
result
63+
}
64+
5665
pub fn hash_iter<'a, T: 'a, I, F, E>(&self, iter: I, hash_func: F) -> Result<PyHash, E>
5766
where
5867
I: IntoIterator<Item = &'a T>,

0 commit comments

Comments
 (0)