We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39e47fb commit f78ac8cCopy full SHA for f78ac8c
src/ecdh.rs
@@ -47,6 +47,12 @@ const SHARED_SECRET_SIZE: usize = constants::SECRET_KEY_SIZE;
47
pub struct SharedSecret([u8; SHARED_SECRET_SIZE]);
48
impl_display_secret!(SharedSecret);
49
50
+impl From<[u8; SHARED_SECRET_SIZE]> for SharedSecret {
51
+ fn from(arr: [u8; SHARED_SECRET_SIZE]) -> Self {
52
+ SharedSecret(arr)
53
+ }
54
+}
55
+
56
impl SharedSecret {
57
/// Creates a new shared secret from a pubkey and secret key.
58
#[inline]
0 commit comments