Documentation ¶
Overview ¶
Package sponge provides an interface for the sponge functions in IOTA.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpongeFunction ¶
type SpongeFunction interface { Squeeze(length int) (Trits, error) MustSqueeze(length int) Trits SqueezeTrytes(length int) (Trytes, error) MustSqueezeTrytes(length int) Trytes Absorb(in Trits) error AbsorbTrytes(in Trytes) error MustAbsorbTrytes(in Trytes) Reset() Clone() SpongeFunction }
SpongeFunction is a hash function using the sponge construction.
func GetSpongeFunc ¶
func GetSpongeFunc(spongeFunc []SpongeFunction, defaultSpongeFuncCreator ...SpongeFunctionCreator) SpongeFunction
GetSpongeFunc checks if a hash function was given, otherwise uses defaultSpongeFuncCreator. Panics if none given.
type SpongeFunctionCreator ¶
type SpongeFunctionCreator func() SpongeFunction
Click to show internal directories.
Click to hide internal directories.