Versions in this module Expand all Collapse all v1 v1.2.0 Jul 23, 2025 v1.1.0 Jul 6, 2025 v1.0.0 Feb 6, 2025 Changes in this version + const EntropyBits128 + const EntropyBits160 + const EntropyBits256 + const KeyHyphenCount + const KeyLengthWithHyphens + const KeyLengthWithoutHyphens + const KeyPartLength + const KeyPartsCount + const UUIDLength + type APIKey struct + Checksum string + Entropy string + Key Key + Prefix string + func NewAPIKey(prefix, uuid string, opts ...Option) (APIKey, error) + func NewAPIKeyFromBytes(prefix string, uuid [16]byte, opts ...Option) (APIKey, error) + func ParseAPIKey(apikey string) (APIKey, error) + func (a APIKey) String() string + type Key string + func Encode(uuid string, opts ...Option) (Key, error) + func EncodeBytes(uuid [16]byte, opts ...Option) (Key, error) + func Parse(key string) (Key, error) + func (k Key) Bytes() ([16]byte, error) + func (k Key) Decode() (string, error) + func (k Key) IsValid() bool + func (k Key) String() string + func (k Key) UUID() (string, error) + type Option func(c *config) + var With128BitEntropy Option = func(c *config) { ... } + var With160BitEntropy Option = func(c *config) { ... } + var With256BitEntropy Option = func(c *config) { ... } + var WithoutHyphens Option = func(c *config) { ... }