steganography

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileModeEnabled byte = 0x01
	TextModeEnabled byte = 0x00
	MetadataSize         = 256
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(imagePath string) (*Decoder, error)

func (*Decoder) Extract

func (d *Decoder) Extract() ([]byte, bool, *FileMetadata, error)

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(imagePath string) (*Encoder, error)

func (*Encoder) Hide

func (e *Encoder) Hide(data []byte) error

func (*Encoder) HideFile

func (e *Encoder) HideFile(fileData []byte, metadata *FileMetadata) error

func (*Encoder) SaveOutput

func (e *Encoder) SaveOutput(outputPath string) error

type FileHandler

type FileHandler struct{}

func NewFileHandler

func NewFileHandler() *FileHandler

func (*FileHandler) DeserializeMetadata

func (fh *FileHandler) DeserializeMetadata(data []byte) (*FileMetadata, error)

func (*FileHandler) IsFileSupported

func (fh *FileHandler) IsFileSupported(filePath string) (bool, string)

func (*FileHandler) ReadFileContent

func (fh *FileHandler) ReadFileContent(filePath string) ([]byte, *FileMetadata, error)

func (*FileHandler) SaveFileContent

func (fh *FileHandler) SaveFileContent(data []byte, metadata *FileMetadata, outputPath string) error

func (*FileHandler) SerializeMetadata

func (fh *FileHandler) SerializeMetadata(metadata *FileMetadata) []byte

type FileMetadata

type FileMetadata struct {
	OriginalName string
	FileExt      string
	FileSize     uint64
}

Jump to

Keyboard shortcuts

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