Added mod_word.

This commit is contained in:
Chris Cole 2014-12-10 22:08:32 -05:00
parent 5f76f1cb62
commit 33f3c966ac
2 changed files with 1 additions and 2 deletions

View File

@ -255,6 +255,7 @@ extern "C" {
pub fn BN_mod_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int;
pub fn BN_mul(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int;
pub fn BN_nnmod(rem: *mut BIGNUM, a: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int;
pub fn BN_mod_word(r: *mut BIGNUM, w: c_ulong) -> c_ulong;
pub fn BN_sqr(r: *mut BIGNUM, a: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int;
pub fn BN_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM) -> c_int;

View File

@ -145,13 +145,11 @@ impl BigNum {
}
}
/*XXX
pub fn mod_word(&self, w: c_ulong) -> c_ulong {
unsafe {
BN_mod_word(self.raw(), w)
}
}
*/
pub fn checked_gcd(&self, a: &BigNum) -> Result<BigNum, SslError> {
unsafe {