Skip to content

Commit 81e5801

Browse files
committed
Merge #453: Remove mentions of 32-byte slice from tweak APIs
e612458 Remove mentions of 32-byte slice from tweak APIs (Martin Habovštiak) Pull request description: These methods accept `&Scalar`, not slice and `&Scalar` already guarantees 32-bytes, so this failure case is impossible. ACKs for top commit: sanket1729: ACK e612458. apoelstra: ACK e612458 Tree-SHA512: f1c083756cb99b16b16764c4d603196a99b7bae864ca7f62908866667cf0218c459447b95298edc71de92c1abe1268a1c085495e1626bb0b9168e1af6aaf2af6
2 parents a1ac3fb + e612458 commit 81e5801

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/key.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ impl SecretKey {
270270
///
271271
/// # Errors
272272
///
273-
/// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte
274-
/// length slice.
273+
/// Returns an error if the resulting key would be invalid.
275274
#[inline]
276275
pub fn add_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
277276
unsafe {
@@ -301,8 +300,7 @@ impl SecretKey {
301300
///
302301
/// # Errors
303302
///
304-
/// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte
305-
/// length slice.
303+
/// Returns an error if the resulting key would be invalid.
306304
#[inline]
307305
pub fn mul_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
308306
unsafe {
@@ -1255,7 +1253,7 @@ impl XOnlyPublicKey {
12551253
///
12561254
/// # Errors
12571255
///
1258-
/// If the resulting key would be invalid or if the tweak was not a 32-byte length slice.
1256+
/// If the resulting key would be invalid.
12591257
///
12601258
/// # Examples
12611259
///

0 commit comments

Comments
 (0)