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 9be8e74Copy full SHA for 9be8e74
src/ecdh.rs
@@ -71,6 +71,11 @@ impl SharedSecret {
71
pub fn secret_bytes(&self) -> [u8; SHARED_SECRET_SIZE] {
72
self.0
73
}
74
+
75
+ /// Creates a shared secret from a byte serialization.
76
+ pub fn from_bytes(bytes: [u8; SHARED_SECRET_SIZE]) -> SharedSecret {
77
+ SharedSecret(bytes)
78
+ }
79
80
81
impl Borrow<[u8]> for SharedSecret {
0 commit comments