asbs

Trait Conceal

Source
pub trait Conceal {
    type Err;

    // Required method
    fn conceal<P: Read, C: Read>(
        self,
        payload: P,
        cover: C,
    ) -> Result<usize, Self::Err>;
}
Expand description

A trait for objects able to conceal steganographic messages, or carriers.

Carriers are defined by a single required method, conceal, which hides the payload in the given cover data.

§Examples

binary::Carrier can be used to conceal secret messages in binary data.

Required Associated Types§

Source

type Err

The associated error type of the conceal method.

Required Methods§

Source

fn conceal<P: Read, C: Read>( self, payload: P, cover: C, ) -> Result<usize, Self::Err>

Conceals the payload in the given cover and returns how many bytes were written in total.

This function does not provide any guarantees about written data if payload cannot fit entirely inside cover in its concealed form. An implementation is free to truncate the contents in that case.

§Errors

This function returns any form of error encountered to the caller. If an error is returned, however, it is not guaranteed that no bytes were written.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<M, W> Conceal for &mut Carrier<M, W>
where M: FnMut(usize) -> Option<u8>, W: Write,