rust-bitcoin / rust-secp256k1

Rust language bindings for Bitcoin secp256k1 library.
Creative Commons Zero v1.0 Universal
338 stars 257 forks source link

Deprecate `Message::from_digest_slice`? #710

Closed Kixunil closed 1 month ago

Kixunil commented 1 month ago

There is from_digest method which is more straightforward for probably all use cases - any serious hash engine will output an array, not a slice/vec/whatever. And in the rare scenarios where people use hash engines with crappy API they can just call .try_into().unwrap() themselves - no need to pollute our API.

apoelstra commented 1 month ago

Yeah, not a bad idea. Especially since we expect people to mostly stop using Message conversions anyway.