LSBHidePNGinWAV
stegobox.codec.LSBHidePNGinWAV
Bases: BaseCodec
This module implements simple LSB steganography to hide image in WAV audios. with code shamelessly taken from https://daniellerch.me/stego/lab/intro/lsb-en/#lsb-steganography-in-wav-audio-files
Source code in stegobox/codec/hide_png_in_wav_lsb.py
encode(carrier, payload)
Encoder requires the carrier audio to be WAV and the payload to be a image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
carrier |
Wave_read
|
Carrier audio in format WAV. Read with |
required |
payload |
ndarray
|
Payload (secret image) to be encoded. Read with
|
required |
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
Frame information in bytes of the audio with the payload embedded. |
_wave_params
|
wave._wave_params: Parameters for audio with the payload embedded. |
|
tuple[int, int, int]
|
tuple[int, int, int]: the size of secret image. |
Source code in stegobox/codec/hide_png_in_wav_lsb.py
decode_with_size(carrier, image_size)
Decode the secret image from the carrier audio.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
carrier |
Wave_read
|
Carrier audio in format WAV. Read with |
required |
image_size |
tuple[int, int, int]
|
The size of secret image, i.e., |
required |
Returns:
Type | Description |
---|---|
ndarray
|
The decoded payload (secret image). |