Documentation ¶
Overview ¶
Package png provides a steganography implementation that outputs PNG image steganograms. It accepts both JPEG and PNG images as input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateCapacity ¶
CalculateCapacity determines the maximum number of bytes that can be concealed within the image of the given parameters.
Types ¶
type SteganoPNG ¶
type SteganoPNG struct {
// contains filtered or unexported fields
}
SteganoPNG implements the Stegano interface for PNG image steganograms.
func New ¶
func New() *SteganoPNG
New returns a pointer to a new instance of SteganoPNG that is ready to use.
func (SteganoPNG) Conceal ¶
Conceal encodes the given data to the two least significant bits of the RGB channels of the image decoded from reader and writes a new PNG image to the writer. The alpha channel is deliberately ommitted as alpha channels rarely provide sufficient noise for proper concealment. The given data is also spread across the available encoding bytes. The function returns an error on failure.
func (SteganoPNG) Reveal ¶
Reveal uncovers any steganographic data from the PNG image decoded from reader and writes the output to the writer. It first decodes a mapped byte from the first available encoding byte to determine the length of the subsequent bytes holding the content length. The content length is decoded from the subsequent bytes whereafter the content is decoded from the entire data space. The function returns an error on failure.