Versions in this module Expand all Collapse all v1 v1.0.0 Jun 30, 2026 Changes in this version + const CoefficientMax + const CoefficientMin + const ErrKeyCapacityDetails + const ErrKeyEmptyCoefficients + const ErrKeyEmptyPassword + const ErrKeyHeaderEmbedFailed + const ErrKeyInsufficientCapacity + const ErrKeyInsufficientCoeffs + const ErrKeyInsufficientHeader + const ErrKeyInvalidCoefficientVal + const ErrKeyInvalidForceK + const ErrKeyInvalidKParameter + const ErrKeyMatrixEncodeFailed + const ErrKeyMessageEmbedFailed + const ErrKeyMessageTooLarge + const ErrKeyNilRandomSource + const ErrKeyPermutationFailed + const HeaderSize + const MaxMessageSize + var ErrCodeWordSizeMismatch = f5matrix.ErrCodeWordSizeMismatch + var ErrEmptyCodeWord = f5matrix.ErrEmptyCodeWord + var ErrInvalidKParameter = f5matrix.ErrInvalidKParameter + var ErrMessageBitsExceedK = f5matrix.ErrMessageBitsExceedK + func ApplyMatrixChange(coefficients []int16, indices []int, position int) int16 + func BuildHeader(k, messageSize int) int32 + func CalculateCapacityForK(usableCoeffCount, k int) int + func CalculateCapacityForKWithShrinkage(usableCoeffCount, magnitudeOneCount, k int) int + func CalculateEmbeddingRate(k int) float64 + func CodeWordLength(k int) int + func ComputeCodeWordHash(codeWord []int, n int) int + func DetectShrinkage(coefficient int16) bool + func EffectiveCapacityCoefficients(usableCoeffCount, magnitudeOneCount int) int + func EmbedHeader(coefficients []int16, perm []int, header int32) (nextIndex int, err error) + func ExtractStegoBits(coefficients []int16) []int + func HandleShrinkage(codeWord []int, position int, coefficient int16) (shrunk bool, newCoeff int16) + func MatrixEncode(codeWord []int, messageBits, k int) (changePosition int, err error) + func SelectOptimalK(usableCoeffCount, messageBits int) (k int, err error) + func SelectOptimalKWithShrinkage(usableCoeffCount, magnitudeOneCount, messageBits int) (int, error) + func SetTranslator(t TranslatorProvider) + func Translate(key string) string + func ValidateCoefficients(coefficients []int16) error + func ValidateInputs(coefficients []int16, password string, message []byte, capacity int) error + func ValidateMessage(message []byte, capacity int) error + func ValidatePassword(password string) error + func XORHeaderWithPRNG(header int32, random RandomSource) int32 + type CapacityResult struct + CapacityByK map[int]int + EstimatedShrinkageFactor float64 + MagnitudeOneCount int + TotalCoefficients int + UsableCoefficients int + func CalculateCapacity(coefficients []int16) *CapacityResult + type EmbedOption func(*EmbedOptions) + func WithForceK(k int) EmbedOption + func WithLogger(log logger.Logger) EmbedOption + type EmbedOptions struct + ForceK int + Logger logger.Logger + type EmbedResult struct + BytesEmbedded int + Coefficients []int16 + KParameter int + ShrinkageCount int + UsableCoefficients int + func Embed(coefficients []int16, password string, message []byte) (*EmbedResult, error) + func EmbedWithOptions(coefficients []int16, password string, message []byte, opts EmbedOptions) (*EmbedResult, error) + func EmbedWithRandomSource(coefficients []int16, random RandomSource, message []byte, opts EmbedOptions) (*EmbedResult, 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 + func ValidationErrorf(key string, args ...interface{}) *ValidationError + func (e *ValidationError) Error() string