Force cryptographer to be threadsafe

This commit is contained in:
NGnius (Graham) 2025-02-08 11:57:50 -05:00
parent 9fef33fd17
commit 488a57d5cb

View file

@ -13,7 +13,7 @@ pub use packet::{Packet, StandardPacket};
mod ping;
pub use ping::Ping;
pub trait Cryptographer {
pub trait Cryptographer: Send + Sync {
fn decrypt(&self, to_decrypt: Vec<u8>) -> Vec<u8>;
fn encrypt(&self, to_encrypt: Vec<u8>) -> Vec<u8>;
fn secret(&self) -> &'_ [u8];