stego

package module
v0.0.0-...-e5bedff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2016 License: MIT Imports: 10 Imported by: 0

README

Stego

Stego is a very straightforward implementation of lsb image steganography. It encodes and decodes data into an image. The data or message is hidden in the LSBs of the Red, Green and Blue image components. The package provides both, encoder and decoder, as well as an additional command line tool to easily hide data within and extract hidden data from image files.

Installation

$ go get github.com/toashd/stego

Usage

The command line tool source provides the basic usage pattern of stego.

$ stego -e -p lena.png -m "Lena is beautiful" -o out
$ stego -d -p out.png
  Lena is beautiful

API overview:

  func Encode(w io.Writer, r io.Reader, p *Payload, o *Options) error
  func Decode(w io.Writer, r io.Reader, pwd string) (int64, error)

Todo

  • Support encoding/decoding of audio and video files
  • Fix issues with encoding/decoding go jpeg and gif files
  • Allow encoding of remote images (e.g. url flag)
  • Add web handler to easily plug into web applications

Tools

  • Steghide - steganography program that is able to hide data in various kinds of image- and audio-files
  • Stegano.js - steganographic encoder and decoder for javascript

Papers

Contribution

Please feel free to suggest any kind of improvements and/or refactorings - just file an issue or fork and submit a pull requests.

License

Stego is available under the MIT license. See the LICENSE file for more info.

Documentation

Overview

Stego is a very straightforward implementation of lsb image steganography. It encodes and decodes a message into and from an image. The data is hidden in the LSBs of the Red, Green and Blue image components.

Index

Constants

View Source
const DefaultOutputFormat = "png"

DefaultOutputFormat is the default output file/image format.

Variables

View Source
var (
	ErrUnsupportedFormat = errors.New("sego: unsupported image format")
)

Functions

func Decode

func Decode(w io.Writer, r io.Reader, pwd string) (int64, error)

Decode decodes an images and extracts the payload.

func Encode

func Encode(w io.Writer, r io.Reader, p *Payload, o *Options) error

Encode encodes the given payload into an image.

Types

type Options

type Options struct {
	OutputFormat string
}

Options are the encoding parameters. Supported OutputFormats are png, jpeg, gif, bmp or auto. If format is set to auto, the format is determined by the input format.

type Payload

type Payload struct {
	Data   []byte
	Secret string
}

Payload contains the data to encode into the image file.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL