HideWAVinWAV
stegobox.codec.HideWAVinWAV
Bases: BaseCodec
This algorithm allows to conceal audio files inside audio, using a well known steganographic method: hide the data in the least significant bits. Make encode and decode flexible with regards to sample-bits and number of channels. It currently only supports 16bit/stereo.
- Created by: QiuYu
- Created time: 2023/1/4
Originally implemented in ichaelo/audio_steganagraphy
Source code in stegobox/codec/hide_wavinwav/hide_wavinwav.py
encode_with_bits(bits, carrier, payload)
Encoder requires carrier audio to be WAV and payload to be a WAV audio.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bits |
int
|
Sample bits. |
required |
carrier |
Wave_read
|
Carrier audio in WAV. Read with |
required |
payload |
Wave_read
|
Payload (secret message) to be encoded. Payload in WAV. Read with
|
required |
Returns:
Name | Type | Description |
---|---|---|
sample |
bytes
|
Frame information in bytes of the audio with the payload embedded. |
params |
tuple
|
Parameters for audio with the payload embedded. |
Source code in stegobox/codec/hide_wavinwav/hide_wavinwav.py
decode_with_bits(carrier, bits)
Decode the secret payload from the carrier audio.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
carrier |
Wave_read
|
Encoded carrier audio. Read with |
required |
bits |
int
|
Sample bits. |
required |
Returns:
Name | Type | Description |
---|---|---|
sample |
bytes
|
Frame information in bytes of the audio revealed. |
params |
tuple
|
Parameters for audio revealed. |