Versions in this module Expand all Collapse all v1 v1.0.1 Jun 30, 2026 v1.0.0 Jun 30, 2026 Changes in this version + const CoefficientMax + const CoefficientMin + const ErrKeyEmptyCoefficients + const ErrKeyEmptyPassword + const ErrKeyFileSizeExceedsMax + const ErrKeyIncompleteExtraction + const ErrKeyInsufficientCoeffs + const ErrKeyInvalidCoefficientVal + const ErrKeyInvalidFileSize + const ErrKeyInvalidKParameter + const ErrKeyPermutationFailed + const ErrKeySeedingFailed + const HeaderSize + const MaxCoefficientArraySize + const MaxFileSize + const MaxKParameter + const MaxMessageSize + const MinKParameter + var ErrEmptyPassword = errors.New("f5messageextract: password cannot be empty") + var ErrIncompleteExtraction = errors.New("f5messageextract: extraction incomplete, not all bytes extracted") + var ErrInsufficientCoefficients = errors.New("f5messageextract: insufficient usable coefficients for extraction") + var ErrInvalidFileSize = errors.New("f5messageextract: invalid file size in header") + var ErrInvalidKParameter = errors.New("f5messageextract: k parameter outside valid range [1, 31]") + var ErrNoCoefficients = errors.New("f5messageextract: coefficient array is empty") + var ErrSeedingFailed = errors.New("f5messageextract: PRNG seeding failed") + func ApplyDeZigZag(shuffledIndex int) int + func DetectLocale() string + func GeneratePermutation(random f5prng.RandomSource, size int) ([]int, error) + func GetLogger() logger.Logger + func GetStegoBit(coefficient int16) int + func GetSupportedLocales() []string + func InitializePRNG(password string) f5prng.RandomSource + func NewTranslator(locale ...string) (*i18n.Translator, error) + func SetLogger(l logger.Logger) + func SetTranslator(translator TranslatorProvider) + func Translate(key string) string + func ValidateCoefficients(coefficients []int16) error + func ValidatePassword(password string) error + type ExtractionResult struct + Data []byte + FileSize int + K int + type Extractor interface + Extract func(coefficients []int16, password string) (*ExtractionResult, error) + type F5Extractor struct + func NewExtractor(hasher Hasher, permutator Permutator, opts ...Option) *F5Extractor + func (f *F5Extractor) Extract(coefficients []int16, password string) (*ExtractionResult, error) + func (f *F5Extractor) ExtractBytes(coefficients []int16, password string) ([]byte, error) + type Hasher interface + Sum func(data []byte) []byte + type Option func(*F5Extractor) + func WithMaxFileSize(size int) Option + func WithPRNGFactory(factory PRNGFactory) Option + func WithPermutationPool() Option + type PRNGFactory = f5prng.PRNGFactory + type Permutator interface + Generate func(size int, random RandomSource) ([]int, error) + GenerateInto func(buf []int, size int, random RandomSource) ([]int, error) + type RandomSource = f5prng.RandomSource + type TranslatorProvider interface + GetLocale func() string + HasKey func(key string) bool + SetLocale func(locale string) + Translate func(key string) string + TranslateWithArgs func(key string, args ...interface{}) string + func GetTranslator() TranslatorProvider + type ValidationError struct + Key string + Message string + Wrapped error + func NewValidationErrorWithSentinel(key string, sentinel error, args ...interface{}) *ValidationError + func ValidationErrorf(key string, args ...interface{}) *ValidationError + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error