Remove erroneous duplicate feature

When we removed the "global-context-less-secure" a duplicate feature
snuck in, remove it.
This commit is contained in:
Tobin Harding 2022-02-09 07:55:02 +00:00
parent ecb62612b5
commit d79989bc95
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 9 additions and 1 deletions

View File

@ -198,7 +198,7 @@ use core::{mem, fmt, str};
use ffi::{CPtr, types::AlignedType}; use ffi::{CPtr, types::AlignedType};
#[cfg(feature = "global-context")] #[cfg(feature = "global-context")]
#[cfg_attr(docsrs, doc(cfg(any(feature = "global-context", feature = "global-context"))))] #[cfg_attr(docsrs, doc(cfg(feature = "global-context")))]
pub use context::global::SECP256K1; pub use context::global::SECP256K1;
#[cfg(feature = "bitcoin_hashes")] #[cfg(feature = "bitcoin_hashes")]
@ -458,6 +458,14 @@ impl<C: Signing> Secp256k1<C> {
} }
} }
/// Generates a random keypair using the global [`SECP256K1`] context.
#[inline]
#[cfg(all(feature = "global-context", feature = "rand"))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "global-context", feature = "rand"))))]
pub fn generate_keypair<R: Rng + ?Sized>(rng: &mut R) -> (key::SecretKey, key::PublicKey) {
SECP256K1.generate_keypair(rng)
}
/// Utility function used to parse hex into a target u8 buffer. Returns /// Utility function used to parse hex into a target u8 buffer. Returns
/// the number of bytes converted or an error if it encounters an invalid /// the number of bytes converted or an error if it encounters an invalid
/// character or unexpected end of string. /// character or unexpected end of string.