Documentation ¶
Overview ¶
Package algos implements the set of supported algorithms for the package github.com/zedseven/steg.
Index ¶
- func AlgoAddressor(algo Algo, seed, channels int64, bitsPerChannel uint8) (func() (int64, error), error)
- func PatternAddressor(seed, channels int64, bitsPerChannel uint8) func() (int64, error)
- func SequentialAddressor(channels int64, bitsPerChannel uint8) func() (int64, error)
- type Algo
- type EmptyPoolError
- type UnknownAlgoError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlgoAddressor ¶
func AlgoAddressor(algo Algo, seed, channels int64, bitsPerChannel uint8) (func() (int64, error), error)
AlgoAddressor facilitates running different algorithm addressors at runtime based on a provided algo value.
func PatternAddressor ¶
PatternAddressor is an algorithm that returns unique, random addresses in the range of 0 to Max.
Types ¶
type Algo ¶
type Algo int
Algo is used to define the various algorithm types supported by the package.
func StringToAlgo ¶
StringToAlgo simply parses a string into an algorithm type, or AlgoUnknown if the string is not recognized.
type EmptyPoolError ¶
type EmptyPoolError struct{}
EmptyPoolError is thrown when an algorithm addressor is called but it's pool of available addresses to hand out is empty.
func (EmptyPoolError) Error ¶
func (e EmptyPoolError) Error() string
Error returns a string that explains the EmptyPoolError.
type UnknownAlgoError ¶
type UnknownAlgoError struct { // Algorithm is the algorithm provided that is unknown to the package. Algorithm Algo }
UnknownAlgoError is thrown when an unknown algorithm type is provided.
func (UnknownAlgoError) Error ¶
func (e UnknownAlgoError) Error() string
Error returns a string that explains the UnknownAlgoError.