Skip to main content

Crate stego_rust

Crate stego_rust 

Source
Expand description

StegoRust — image steganography with AES-256-GCM and Argon2id.

§Quick start

use stego_rust::{StegoEncoder, StegoDecoder};

// Encode
let images = vec![image::RgbImage::new(200, 200)];
let stego = StegoEncoder::builder()
    .bits_per_channel(1)
    .build()?
    .encode(images, b"secret message", b"hunter2")?;

// Decode
let recovered = StegoDecoder::builder()
    .build()
    .decode(stego, b"hunter2")?;

assert_eq!(recovered, b"secret message");

Structs§

ChunkHeader
Per-chunk header embedded at the start of every stego image.
StegoDecoder
Decodes a secret message from one or more stego images.
StegoEncoder
Encodes a secret message into one or more cover images using LSB steganography.

Enums§

StegoError
Errors returned by StegoRust operations.

Constants§

CHUNK_HEADER_SIZE
Serialized size of a ChunkHeader in bytes.

Functions§

image_capacity
Returns the number of bytes that can be hidden in img using bpc bits per channel.
scan_used_bytes
Returns the number of bytes already used in img by embedded messages.
scan_used_channels
Scans img sequentially reading ChunkHeaders at bpc=1 to find how many channels are already occupied by existing messages. Stops at the first invalid header. This is O(n_messages), not O(pixels).

Type Aliases§

Result
Convenience alias for Result<T, StegoError>.