From c69d43d84ed5d8740f072752433ff26a6092b2f4 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Wed, 13 May 2020 14:52:18 +0300 Subject: [PATCH] Update key.rs to use the new seckey functions --- src/ecdh.rs | 1 - src/key.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ecdh.rs b/src/ecdh.rs index 394abe3..2174399 100644 --- a/src/ecdh.rs +++ b/src/ecdh.rs @@ -167,7 +167,6 @@ mod tests { use rand::thread_rng; use super::SharedSecret; use super::super::Secp256k1; - use Error; #[test] fn ecdh() { diff --git a/src/key.rs b/src/key.rs index 8a2c661..8d65185 100644 --- a/src/key.rs +++ b/src/key.rs @@ -154,7 +154,7 @@ impl SecretKey { &mut self ) { unsafe { - let res = ffi::secp256k1_ec_privkey_negate( + let res = ffi::secp256k1_ec_seckey_negate( ffi::secp256k1_context_no_precomp, self.as_mut_c_ptr() ); @@ -174,7 +174,7 @@ impl SecretKey { return Err(Error::InvalidTweak); } unsafe { - if ffi::secp256k1_ec_privkey_tweak_add( + if ffi::secp256k1_ec_seckey_tweak_add( ffi::secp256k1_context_no_precomp, self.as_mut_c_ptr(), other.as_c_ptr(), @@ -199,7 +199,7 @@ impl SecretKey { return Err(Error::InvalidTweak); } unsafe { - if ffi::secp256k1_ec_privkey_tweak_mul( + if ffi::secp256k1_ec_seckey_tweak_mul( ffi::secp256k1_context_no_precomp, self.as_mut_c_ptr(), other.as_c_ptr(),