diff options
Diffstat (limited to 'src/handshake/device.rs')
-rw-r--r-- | src/handshake/device.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/handshake/device.rs b/src/handshake/device.rs index 6178831..6a55f6e 100644 --- a/src/handshake/device.rs +++ b/src/handshake/device.rs @@ -76,6 +76,15 @@ impl Device { } } + /// Return the secret key of the device + /// + /// # Returns + /// + /// A secret key (x25519 scalar) + pub fn get_sk(&self) -> StaticSecret { + StaticSecret::from(self.sk.to_bytes()) + } + /// Add a new public key to the state machine /// To remove public keys, you must create a new machine instance /// |