Make modular addition take a trait argument like the others.
This commit is contained in:
@@ -21,8 +21,8 @@ pub fn raw_addition(x: &mut [u64], y: &[u64]) -> u64 {
|
|||||||
carry as u64
|
carry as u64
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ModAdd {
|
pub trait ModAdd<T=Self> {
|
||||||
fn modadd(&mut self, y: &Self, m: &Self);
|
fn modadd(&mut self, y: &Self, m: &T);
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! generate_adders
|
macro_rules! generate_adders
|
||||||
|
|||||||
Reference in New Issue
Block a user