Commit 33f3c966 authored by Chris Cole's avatar Chris Cole
Browse files

Added mod_word.

parent 5f76f1cb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;

+0 −2
Original line number Diff line number Diff line
@@ -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 {