engine

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoFormat          = errors.New("crypha: a carrier format is required")
	ErrUnknownFormat     = errors.New("crypha: unknown carrier format")
	ErrUnknownTechnique  = errors.New("crypha: unknown pdf technique")
	ErrTechniqueOnNonPDF = errors.New("crypha: technique only applies to the pdf format")
	ErrUndetected        = errors.New("crypha: no crypha payload detected; pass a format to force a carrier")
)

Functions

func Capacity

func Capacity(format string, cover io.Reader) (int, error)

func EnvelopeSize

func EnvelopeSize(data []byte, opts payload.Options) (int, error)

func Overhead

func Overhead(encrypted bool) int

func ResolveCarrier

func ResolveCarrier(format, technique string) (carrier.Carrier, error)

func Techniques

func Techniques(format string) []string

Types

type CapacityRow

type CapacityRow struct {
	Format   string
	Capacity int
	Err      error
}

func CapacityAll

func CapacityAll(cover []byte) []CapacityRow

type FormatInfo

type FormatInfo struct {
	Name       string
	Techniques []string
}

func Catalog

func Catalog() []FormatInfo

type HideRequest

type HideRequest struct {
	Format    string
	Technique string
	Cover     io.Reader
	Payload   []byte
	Out       io.Writer
	Options   payload.Options
}

type HideResult

type HideResult struct {
	Format        string
	Technique     string
	PayloadBytes  int
	EnvelopeBytes int
	Encrypted     bool
	Compressed    bool
}

func Hide

func Hide(req HideRequest) (HideResult, error)

type RevealRequest

type RevealRequest struct {
	Format     string
	Stego      []byte
	Passphrase []byte
}

type RevealResult

type RevealResult struct {
	Format    string
	Data      []byte
	Encrypted bool
}

func Reveal

func Reveal(req RevealRequest) (RevealResult, error)

Jump to

Keyboard shortcuts

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