Versions in this module Expand all Collapse all v1 v1.0.1 Jan 20, 2024 v1.0.0 Jan 20, 2024 Changes in this version + var ErrInvalidKey = errors.New("invalid key, it must be 16 bytes long") + var ErrNoSecret = errors.New("secret object is nil, you must call SetKey() first") + func Hash(input uint) string + func SetKey(key string) + type EncryptedID struct + Val uint + func NewEncryptedID(val uint) EncryptedID + func (i *EncryptedID) Scan(value interface{}) error + func (i EncryptedID) MarshalJSON() ([]byte, error) + func (i EncryptedID) ToInt() int + func (i EncryptedID) ToMasked() string + func (i EncryptedID) ToString() string + func (i EncryptedID) Value() (driver.Value, error) + type Secret struct + func NewSecret(maskSecret string) *Secret + func (e Secret) Mask(id uint) (string, error) + func (e Secret) Unmask(ciphertext string) (uint, error)