Trait num_bigint_dig::traits::ModInverse
source · pub trait ModInverse<R: Sized>: Sized {
type Output: Sized;
// Required method
fn mod_inverse(self, m: R) -> Option<Self::Output>;
}
Expand description
Generic trait to implement modular inverse.
Required Associated Types§
Required Methods§
sourcefn mod_inverse(self, m: R) -> Option<Self::Output>
fn mod_inverse(self, m: R) -> Option<Self::Output>
Function to calculate the modular multiplicative inverse of an integer a modulo m.
TODO: references
Returns the modular inverse of self
.
If none exists it returns None
.