From 33f3c966ac0448a6f906f23d7cf51969c088bfa1 Mon Sep 17 00:00:00 2001 From: Chris Cole Date: Wed, 10 Dec 2014 22:08:32 -0500 Subject: [PATCH] Added mod_word. --- openssl-sys/src/lib.rs | 1 + src/bn/mod.rs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 2b0c9292..931920a9 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -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; diff --git a/src/bn/mod.rs b/src/bn/mod.rs index 3944fdcd..95805085 100644 --- a/src/bn/mod.rs +++ b/src/bn/mod.rs @@ -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 { unsafe {