#include <steganography.hpp>
|
| std::vector< unsigned char > | ReadPayload (const boost::filesystem::path &payload_path) |
| |
| void | WritePayload (const boost::filesystem::path &payload_path, const std::vector< unsigned char > &payload) |
| |
| template<class T > |
| void | SetBit (T *target, const int &bit, const int &value) |
| |
| template<class T > |
| int | GetBit (const T &target, const int &bit) |
| |
Abstract base class which each steganography technique will extend.
◆ Steganography()
| Steganography::Steganography |
( |
const boost::filesystem::path & |
image_path | ) |
|
|
inlineexplicit |
Default constructor for Steganography class, will be overridden for different steganography techniques.
- Parameters
-
| image_path | The path to the input carrier image. |
◆ Decode()
| virtual void Steganography::Decode |
( |
| ) |
|
|
pure virtual |
Decode Function that must be overridden by the subclass which decodes a payload from the carrier image using the steganographic technique defined in the subclass.
Implemented in DiscreteCosineTransform, and LeastSignificantBit.
◆ Encode()
| virtual void Steganography::Encode |
( |
const boost::filesystem::path & |
payload_path | ) |
|
|
pure virtual |
Encode Function that must be overridden by the subclass which encodes a payload into the carrier image using the steganographic technique defined in the subclass.
- Parameters
-
| payload_path | Path to the file we are encoding. |
- Exceptions
-
Implemented in DiscreteCosineTransform, and LeastSignificantBit.
◆ GetBit()
template<class T >
| int Steganography::GetBit |
( |
const T & |
target, |
|
|
const int & |
bit |
|
) |
| |
|
inlineprotected |
Get the n'th significant bit of a generic type.
This function is designed to get the n'th significant bit of integer/char types. It assumes that it is being used correctly; there is no incorrect input detection.
- Template Parameters
-
| target | "Any" type which works with bytewise operators, the target to set the but of. |
- Parameters
-
| bit | Which bit to get in the target. |
- Returns
- The n'th significant bit.
◆ ReadPayload()
| std::vector< unsigned char > Steganography::ReadPayload |
( |
const boost::filesystem::path & |
payload_path | ) |
|
|
protected |
Read all the bytes from a payload file into a vector.
- Parameters
-
| payload_path | The path to the file to read as the payload. |
- Returns
- A vector containing all the bytes from the payload file.
◆ SetBit()
template<class T >
| void Steganography::SetBit |
( |
T * |
target, |
|
|
const int & |
bit, |
|
|
const int & |
value |
|
) |
| |
|
inlineprotected |
Set the n'th significant bit of a generic type.
This function is designed to set the n'th significant bit of integer/char types. It assumes that it is being used correctly; there is no incorrect input detection.
- Template Parameters
-
| target | "Any" type which works with bytewise operators, the target to set the bit of. |
- Parameters
-
| bit | Which bit to set in the target. |
| value | The value the target bit will be set too. |
◆ WritePayload()
| void Steganography::WritePayload |
( |
const boost::filesystem::path & |
payload_path, |
|
|
const std::vector< unsigned char > & |
payload |
|
) |
| |
|
protected |
Write all the bytes decoded from the carrier image to a file.
- Parameters
-
| payload_path | The path to the file that will be created. |
| payload | The payload decoded from the carrier image. |
◆ image
An in memory copy of the input image in which we will embed the data.
◆ image_path
| Steganography::image_path |
|
protected |
The path to the carrier image stored on disk. This image will not be modified.
The documentation for this class was generated from the following files: