File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,12 @@ impl SharedSecret {
5555
5656 /// Returns the shared secret as a byte value.
5757 #[ inline]
58- pub fn secret_bytes ( & self ) -> [ u8 ; SHARED_SECRET_SIZE ] { self . 0 }
58+ pub fn to_secret_bytes ( & self ) -> [ u8 ; SHARED_SECRET_SIZE ] { self . 0 }
59+
60+ /// Returns the shared secret as a byte value.
61+ #[ deprecated( since = "TBD" , note = "Use `to_secret_bytes` instead." ) ]
62+ #[ inline]
63+ pub fn secret_bytes ( & self ) -> [ u8 ; SHARED_SECRET_SIZE ] { self . to_secret_bytes ( ) }
5964
6065 /// Creates a shared secret from `bytes` array.
6166 #[ inline]
Original file line number Diff line number Diff line change @@ -612,10 +612,15 @@ impl Keypair {
612612
613613 /// Returns the secret bytes for this key pair.
614614 #[ inline]
615- pub fn secret_bytes ( & self ) -> [ u8 ; constants:: SECRET_KEY_SIZE ] {
615+ pub fn to_secret_bytes ( & self ) -> [ u8 ; constants:: SECRET_KEY_SIZE ] {
616616 * SecretKey :: from_keypair ( self ) . as_ref ( )
617617 }
618618
619+ /// Returns the secret bytes for this key pair.
620+ #[ deprecated( since = "TBD" , note = "use to_secret_bytes instead" ) ]
621+ #[ inline]
622+ pub fn secret_bytes ( & self ) -> [ u8 ; constants:: SECRET_KEY_SIZE ] { self . to_secret_bytes ( ) }
623+
619624 /// Tweaks a keypair by first converting the public key to an xonly key and tweaking it.
620625 ///
621626 /// # Errors
You can’t perform that action at this time.
0 commit comments