140
140
//! * `alloc` - use the `alloc` standard Rust library to provide heap allocations.
141
141
//! * `rand` - use `rand` library to provide random generator (e.g. to generate keys).
142
142
//! * `rand-std` - use `rand` library with its `std` feature enabled. (Implies `rand`.)
143
- //! * `bitcoin-hashes` - use the `bitcoin-hashes ` library.
144
- //! * `bitcoin-hashes-std` - use the `bitcoin-hashes ` library with its `std` feature enabled (implies `bitcoin-hashes`).
143
+ //! * `bitcoin-hashes` - use the `bitcoin_hashes ` library.
144
+ //! * `bitcoin-hashes-std` - use the `bitcoin_hashes ` library with its `std` feature enabled (implies `bitcoin-hashes`).
145
145
//! * `recovery` - enable functions that can compute the public key from signature.
146
146
//! * `lowmemory` - optimize the library for low-memory environments.
147
147
//! * `global-context` - enable use of global secp256k1 context (implies `std`).
@@ -183,7 +183,7 @@ use core::marker::PhantomData;
183
183
use core:: ptr:: NonNull ;
184
184
use core:: { fmt, mem, str} ;
185
185
186
- #[ cfg( feature = "bitcoin-hashes " ) ]
186
+ #[ cfg( feature = "bitcoin_hashes " ) ]
187
187
#[ cfg_attr( docsrs, doc( cfg( feature = "bitcoin-hashes" ) ) ) ]
188
188
pub use bitcoin_hashes as hashes;
189
189
#[ cfg( feature = "global-context" ) ]
@@ -200,7 +200,7 @@ pub use serde;
200
200
pub use crate :: context:: * ;
201
201
use crate :: ffi:: types:: AlignedType ;
202
202
use crate :: ffi:: CPtr ;
203
- #[ cfg( feature = "bitcoin-hashes " ) ]
203
+ #[ cfg( feature = "bitcoin_hashes " ) ]
204
204
use crate :: hashes:: Hash ;
205
205
pub use crate :: key:: { PublicKey , SecretKey , * } ;
206
206
pub use crate :: scalar:: Scalar ;
@@ -213,19 +213,19 @@ pub trait ThirtyTwoByteHash {
213
213
fn into_32 ( self ) -> [ u8 ; 32 ] ;
214
214
}
215
215
216
- #[ cfg( feature = "bitcoin-hashes " ) ]
216
+ #[ cfg( feature = "bitcoin_hashes " ) ]
217
217
#[ cfg_attr( docsrs, doc( cfg( feature = "bitcoin-hashes" ) ) ) ]
218
218
impl ThirtyTwoByteHash for hashes:: sha256:: Hash {
219
219
fn into_32 ( self ) -> [ u8 ; 32 ] { self . into_inner ( ) }
220
220
}
221
221
222
- #[ cfg( feature = "bitcoin-hashes " ) ]
222
+ #[ cfg( feature = "bitcoin_hashes " ) ]
223
223
#[ cfg_attr( docsrs, doc( cfg( feature = "bitcoin-hashes" ) ) ) ]
224
224
impl ThirtyTwoByteHash for hashes:: sha256d:: Hash {
225
225
fn into_32 ( self ) -> [ u8 ; 32 ] { self . into_inner ( ) }
226
226
}
227
227
228
- #[ cfg( feature = "bitcoin-hashes " ) ]
228
+ #[ cfg( feature = "bitcoin_hashes " ) ]
229
229
#[ cfg_attr( docsrs, doc( cfg( feature = "bitcoin-hashes" ) ) ) ]
230
230
impl < T : hashes:: sha256t:: Tag > ThirtyTwoByteHash for hashes:: sha256t:: Hash < T > {
231
231
fn into_32 ( self ) -> [ u8 ; 32 ] { self . into_inner ( ) }
@@ -263,7 +263,7 @@ impl Message {
263
263
/// # Examples
264
264
///
265
265
/// ```
266
- /// # #[cfg(feature = "bitcoin-hashes ")] {
266
+ /// # #[cfg(feature = "bitcoin_hashes ")] {
267
267
/// use secp256k1::hashes::{sha256, Hash};
268
268
/// use secp256k1::Message;
269
269
///
@@ -274,7 +274,7 @@ impl Message {
274
274
/// assert_eq!(m1, m2);
275
275
/// # }
276
276
/// ```
277
- #[ cfg( feature = "bitcoin-hashes " ) ]
277
+ #[ cfg( feature = "bitcoin_hashes " ) ]
278
278
#[ cfg_attr( docsrs, doc( cfg( feature = "bitcoin-hashes" ) ) ) ]
279
279
pub fn from_hashed_data < H : ThirtyTwoByteHash + hashes:: Hash > ( data : & [ u8 ] ) -> Self {
280
280
<H as hashes:: Hash >:: hash ( data) . into ( )
@@ -1037,7 +1037,7 @@ mod tests {
1037
1037
assert ! ( SECP256K1 . verify_ecdsa( & msg, & sig, & pk) . is_ok( ) ) ;
1038
1038
}
1039
1039
1040
- #[ cfg( feature = "bitcoin-hashes " ) ]
1040
+ #[ cfg( feature = "bitcoin_hashes " ) ]
1041
1041
#[ test]
1042
1042
fn test_from_hash ( ) {
1043
1043
use crate :: hashes:: { self , Hash } ;
0 commit comments