pub fn combine(&self, secp: &Secp256k1, other: &PublicKey) -> Result<PublicKey, Error> {
        unsafe {
            let mut ret = mem::uninitialized();
            let ptrs = [self.as_ptr(), other.as_ptr()];
            if ffi::secp256k1_ec_pubkey_combine(secp.ctx, &mut ret, ptrs.as_ptr(), 2) == 1 {
                Ok(PublicKey(ret))
            } else {
                Err(InvalidPublicKey)
            }
        }
    }
/// Adds a second key to this one, returning the sum. Returns an error if
/// the result would be the point at infinity, i.e. we are adding this point
/// to its own negation
Adds a second key to this one, returning the sum. Returns an error if
the result would be the point at infinity, i.e. we are adding this point
to its own negation
Adds a second key to this one returning the sum . Returns an error if the result would be the point at infinity i . e . we are adding this point to its own negation
pub fn combine(&self, secp: &Secp256k1, other: &PublicKey) -> Result<PublicKey, Error> {
        unsafe {
            let mut ret = mem::uninitialized();
            let ptrs = [self.as_ptr(), other.as_ptr()];
            if ffi::secp256k1_ec_pubkey_combine(secp.ctx, &mut ret, ptrs.as_ptr(), 2) == 1 {
                Ok(PublicKey(ret))
            } else {
                Err(InvalidPublicKey)
            }
        }
    }
pub fn combine ( & self , secp : & Secp256k1 , other : & PublicKey ) -> Result < PublicKey , Error > { unsafe { let mut ret = mem :: uninitialized ( ) ; let ptrs = [ self . as_ptr ( ) , other . as_ptr ( ) ] ; if ffi :: secp256k1_ec_pubkey_combine ( secp . ctx , & mut ret , ptrs . as_ptr ( ) , 2 ) == 1 { Ok ( PublicKey ( ret ) ) } else { Err ( InvalidPublicKey ) } } }
Adds a second key to this one, returning the sum.
Adds a second key to this one returning the sum .
&self
secp
&Secp256k1
other
&PublicKey
&self
secp
&Secp256k1
other
&PublicKey