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 {
55
55
56
56
/// Returns the shared secret as a byte value.
57
57
#[ 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 ( ) }
59
64
60
65
/// Creates a shared secret from `bytes` array.
61
66
#[ inline]
Original file line number Diff line number Diff line change @@ -612,10 +612,15 @@ impl Keypair {
612
612
613
613
/// Returns the secret bytes for this key pair.
614
614
#[ inline]
615
- pub fn secret_bytes ( & self ) -> [ u8 ; constants:: SECRET_KEY_SIZE ] {
615
+ pub fn to_secret_bytes ( & self ) -> [ u8 ; constants:: SECRET_KEY_SIZE ] {
616
616
* SecretKey :: from_keypair ( self ) . as_ref ( )
617
617
}
618
618
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
+
619
624
/// Tweaks a keypair by first converting the public key to an xonly key and tweaking it.
620
625
///
621
626
/// # Errors
You can’t perform that action at this time.
0 commit comments