Documentation ¶
Index ¶
- type SteganoHelper
- func (instance *SteganoHelper) Decode(msgLen uint32, pictureInputFile image.Image) (message []byte)
- func (instance *SteganoHelper) DecodeMessageBytes(img image.Image, key []byte) ([]byte, error)
- func (instance *SteganoHelper) DecodeMessageBytesFromBytes(data []byte, key []byte) ([]byte, error)
- func (instance *SteganoHelper) DecodeMessageBytesFromFile(filename string, key []byte) ([]byte, error)
- func (instance *SteganoHelper) Encode(writeBuffer *bytes.Buffer, pictureInputFile image.Image, message []byte) error
- func (instance *SteganoHelper) EncodeMessageBytes(img image.Image, msg, key []byte) (*bytes.Buffer, error)
- func (instance *SteganoHelper) EncodeMessageBytesFromBytes(data []byte, message, key []byte) (*bytes.Buffer, error)
- func (instance *SteganoHelper) EncodeMessageBytesFromFile(filename string, message, key []byte) (*bytes.Buffer, error)
- func (instance *SteganoHelper) EncodeNRGBA(writeBuffer *bytes.Buffer, rgbImage *image.NRGBA, message []byte) error
- func (instance *SteganoHelper) GetMessageSizeFromFile(filename string) uint32
- func (instance *SteganoHelper) GetMessageSizeFromImage(pictureInputFile image.Image) (size uint32)
- func (instance *SteganoHelper) MaxEncodeSize(img image.Image) uint32
- func (instance *SteganoHelper) MaxEncodeSizeFromFile(filename string) uint32
- func (instance *SteganoHelper) Verify(img image.Image, message []byte) bool
- func (instance *SteganoHelper) VerifyNRGBA(img *image.NRGBA, message []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SteganoHelper ¶
type SteganoHelper struct { }
var Stegano *SteganoHelper
func (*SteganoHelper) Decode ¶
func (instance *SteganoHelper) Decode(msgLen uint32, pictureInputFile image.Image) (message []byte)
Decode gets messages from pictures using LSB steganography, decode the message from the picture and return it as a sequence of bytes It wraps EncodeNRGBA making the conversion from image.Image to image.NRGBA
Input: msgLen uint32 : size of the message to be decoded pictureInputFile image.Image : image data used in decoding Output: message []byte decoded from image
func (*SteganoHelper) DecodeMessageBytes ¶
func (*SteganoHelper) DecodeMessageBytesFromBytes ¶
func (instance *SteganoHelper) DecodeMessageBytesFromBytes(data []byte, key []byte) ([]byte, error)
func (*SteganoHelper) DecodeMessageBytesFromFile ¶
func (instance *SteganoHelper) DecodeMessageBytesFromFile(filename string, key []byte) ([]byte, error)
func (*SteganoHelper) Encode ¶
func (instance *SteganoHelper) Encode(writeBuffer *bytes.Buffer, pictureInputFile image.Image, message []byte) error
Encode encodes a given string into the input image using the least significant bit encryption (LSB steganography) The minimum image size is 23 pixels It wraps EncodeNRGBA making the conversion from image.Image to image.NRGBA
Input: writeBuffer *bytes.Buffer : the destination of the encoded image bytes message []byte : byte slice of the message to be encoded pictureInputFile image.Image : image data used in encoding Output: bytes buffer ( io.writter ) to create file, or send data.
func (*SteganoHelper) EncodeMessageBytes ¶
func (*SteganoHelper) EncodeMessageBytesFromBytes ¶
func (*SteganoHelper) EncodeMessageBytesFromFile ¶
func (*SteganoHelper) EncodeNRGBA ¶
func (instance *SteganoHelper) EncodeNRGBA(writeBuffer *bytes.Buffer, rgbImage *image.NRGBA, message []byte) error
EncodeNRGBA encodes a given string into the input image using the least significant bit encryption (LSB steganography) The minimum image size is 24 pixels for one byte. For each additional byte, it is necessary 3 more pixels.
Input: writeBuffer *bytes.Buffer : the destination of the encoded image bytes pictureInputFile image.NRGBA : image data used in encoding message []byte : byte slice of the message to be encoded Output: bytes buffer ( io.writter ) to create file, or send data.
func (*SteganoHelper) GetMessageSizeFromFile ¶
func (instance *SteganoHelper) GetMessageSizeFromFile(filename string) uint32
func (*SteganoHelper) GetMessageSizeFromImage ¶
func (instance *SteganoHelper) GetMessageSizeFromImage(pictureInputFile image.Image) (size uint32)
GetMessageSizeFromImage gets the size of the message from the first four bytes encoded in the image
func (*SteganoHelper) MaxEncodeSize ¶
func (instance *SteganoHelper) MaxEncodeSize(img image.Image) uint32
MaxEncodeSize given an image will find how many bytes can be stored in that image using least significant bit encoding ((width * height * 3) / 8 ) - 4 The result must be at least 4,
func (*SteganoHelper) MaxEncodeSizeFromFile ¶
func (instance *SteganoHelper) MaxEncodeSizeFromFile(filename string) uint32
func (*SteganoHelper) Verify ¶
func (instance *SteganoHelper) Verify(img image.Image, message []byte) bool
func (*SteganoHelper) VerifyNRGBA ¶
func (instance *SteganoHelper) VerifyNRGBA(img *image.NRGBA, message []byte) bool