diff options
| author | s-ol <s+removethis@s-ol.nu> | 2026-03-28 22:35:26 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2026-03-28 22:38:32 +0000 |
| commit | b4bb62b7ca0be710a0a7d5484cb9d3371f24ec2a (patch) | |
| tree | 2cb6178dfa67f52f9be5bd7844969ca92e8cb4f8 /src/packet_content.rs | |
| parent | expose more fields (diff) | |
| download | meshcore-rs-dumb-no-std.tar.gz meshcore-rs-dumb-no-std.zip | |
no-std compatible cryptodumb-no-std
Diffstat (limited to 'src/packet_content.rs')
| -rw-r--r-- | src/packet_content.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/packet_content.rs b/src/packet_content.rs index a6fa914..5b762d7 100644 --- a/src/packet_content.rs +++ b/src/packet_content.rs @@ -11,8 +11,7 @@ use crate::{ }; use bytes::{Buf, Bytes}; -#[cfg(feature = "std")] -use crate::std_identity::Keystore; +use crate::crypto::Keystore; #[derive(PartialEq, Clone, core::fmt::Debug)] pub enum PacketContent { @@ -152,8 +151,7 @@ impl From<Bytes> for PeerToPeerCipher { } impl PeerToPeerCipher { - #[cfg(feature = "std")] - pub fn try_decrypt(&mut self, keystore: &Keystore) -> bool { + pub fn try_decrypt<T: Keystore>(&mut self, keystore: &T) -> bool { let decrypt = keystore.decrypt_and_id_p2p(self.source, self.destination, self.mac, &self.ciphertext); |
