pub struct StegoEncoder { /* private fields */ }Expand description
Encodes a secret message into one or more cover images using LSB steganography.
Create via StegoEncoder::builder().
Implementations§
Source§impl StegoEncoder
impl StegoEncoder
Sourcepub fn encode(
self,
cover_images: Vec<RgbImage>,
message: &[u8],
password: &[u8],
) -> Result<Vec<RgbImage>>
pub fn encode( self, cover_images: Vec<RgbImage>, message: &[u8], password: &[u8], ) -> Result<Vec<RgbImage>>
Encodes message into cover_images using password.
Returns the stego images (one per chunk). The number of output images
is ≤ cover_images.len() and equals the number of chunks required.
Sourcepub fn encode_many(
self,
cover_images: Vec<RgbImage>,
messages: &[&[u8]],
password: &[u8],
) -> Result<Vec<RgbImage>>
pub fn encode_many( self, cover_images: Vec<RgbImage>, messages: &[&[u8]], password: &[u8], ) -> Result<Vec<RgbImage>>
Encodes multiple independent messages into cover_images, packing them
back-to-back. When an image is full, overflow continues into the next image.
Returns the modified images (every image that was written to at least once).
Returns StegoError::InsufficientCapacity if no image has room for a message.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StegoEncoder
impl RefUnwindSafe for StegoEncoder
impl Send for StegoEncoder
impl Sync for StegoEncoder
impl Unpin for StegoEncoder
impl UnsafeUnpin for StegoEncoder
impl UnwindSafe for StegoEncoder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more