pub struct Wtrscape;Expand description
High-level API for encoding messages without pre-established channel
Implementations§
Source§impl Wtrscape
impl Wtrscape
Sourcepub fn encode(
sender: &Agent,
recipient: &PublicIdentity,
cover_text: &str,
secret: &str,
) -> Result<String>
pub fn encode( sender: &Agent, recipient: &PublicIdentity, cover_text: &str, secret: &str, ) -> Result<String>
Encode a secret message for a specific recipient
Sourcepub fn decode(
receiver: &Agent,
sender: &PublicIdentity,
text: &str,
) -> Result<String>
pub fn decode( receiver: &Agent, sender: &PublicIdentity, text: &str, ) -> Result<String>
Decode a message (requires knowing the sender)
Check if text contains a hidden message
Sourcepub fn visible_text(text: &str) -> String
pub fn visible_text(text: &str) -> String
Extract visible text only
Auto Trait Implementations§
impl Freeze for Wtrscape
impl RefUnwindSafe for Wtrscape
impl Send for Wtrscape
impl Sync for Wtrscape
impl Unpin for Wtrscape
impl UnwindSafe for Wtrscape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more