File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,11 +55,12 @@ impl SharedSecret {
5555
5656 /// Returns the shared secret as a byte value.
5757 #[ inline]
58+ #[ deprecated( since = "TBD" , note = "use Shared::Secret::as_secret_bytes instead" ) ]
5859 pub fn to_secret_bytes ( & self ) -> [ u8 ; SHARED_SECRET_SIZE ] { self . 0 }
5960
6061 /// Returns the shared secret as secret bytes
6162 #[ inline]
62- pub fn as_secret_bytes ( & self ) -> [ u8 ; SHARED_SECRET_SIZE ] { self . 0 }
63+ pub fn as_secret_bytes ( & self ) -> & [ u8 ; SHARED_SECRET_SIZE ] { & self . 0 }
6364
6465 /// Returns the shared secret as a byte value.
6566 #[ deprecated( since = "TBD" , note = "Use `to_secret_bytes` instead." ) ]
@@ -68,6 +69,7 @@ impl SharedSecret {
6869
6970 /// Creates a shared secret from `bytes` array.
7071 #[ inline]
72+ #[ deprecated( since = "TBD" , note = "use SharedSecret::from_secret_bytes instead" ) ]
7173 pub fn from_bytes ( bytes : [ u8 ; SHARED_SECRET_SIZE ] ) -> SharedSecret { SharedSecret ( bytes) }
7274
7375 /// Creates a shared secret from a secret `bytes` array.
You can’t perform that action at this time.
0 commit comments