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 MaxAllocationSize + const MinimumSeedEntropyBytes + var ErrAllocationTooLarge = &AllocationError + func DetectLocale() string + func GetLogger() logger.Logger + func GetSupportedLocales() []string + func NewTranslator(locale ...string) (*i18n.Translator, error) + func SetLogger(l logger.Logger) + func SetTranslator(translator TranslatorProvider) + type AllocationError struct + func (e *AllocationError) Error() string + type Hasher interface + BlockSize func() int + Reset func() + Size func() int + Sum func(data []byte) ([]byte, error) + type HasherWithSumInto interface + SumInto func(dst, data []byte) error + type MisuseWarning struct + Message string + Severity string + func DetectPotentialMisuse(n int) []MisuseWarning + type RandomSource interface + Clear func() + NextBytes func(n int) []byte + NextBytesSafe func(n int) ([]byte, error) + NextBytesWithWarnings func(n int) ([]byte, []MisuseWarning) + NextInt func() int32 + Seed func(seed []byte) error + SeedWithValidation func(seed []byte) SeedStrength + func NewSecureRandom(hasher Hasher) RandomSource + type RandomSourceWithBytesInto interface + NextBytesInto func(dst []byte) error + type SecureRandom struct + func (sr *SecureRandom) Clear() + func (sr *SecureRandom) LastError() error + func (sr *SecureRandom) NextBytes(n int) []byte + func (sr *SecureRandom) NextBytesInto(dst []byte) error + func (sr *SecureRandom) NextBytesSafe(n int) ([]byte, error) + func (sr *SecureRandom) NextBytesWithWarnings(n int) ([]byte, []MisuseWarning) + func (sr *SecureRandom) NextInt() int32 + func (sr *SecureRandom) Seed(seed []byte) error + func (sr *SecureRandom) SeedWithValidation(seed []byte) SeedStrength + func (sr *SecureRandom) SetLogger(l logger.Logger) + type SeedStrength int + const SeedStrengthFair + const SeedStrengthGood + const SeedStrengthStrong + const SeedStrengthWeak + func EstimateSeedStrength(seed []byte) SeedStrength + func (s SeedStrength) String() string + 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