Versions in this module Expand all Collapse all v0 v0.2.0 Jul 30, 2026 v0.1.0 Jul 22, 2026 Changes in this version + var ErrInvalidKey = errors.New("crypto: encryption key must be 32 bytes") + var ErrMalformedCiphertext = errors.New("crypto: malformed ciphertext") + var ErrMalformedHash = errors.New("crypto: malformed argon2id hash") + func Hash(password string) (string, error) + func Verify(password, encoded string) (bool, error) + type Cipher struct + func NewCipher(key []byte) (*Cipher, error) + func (c *Cipher) Decrypt(ciphertext []byte) ([]byte, error) + func (c *Cipher) Encrypt(plaintext []byte) ([]byte, error) + type Hasher struct + func NewHasher(params Params) *Hasher + func (h *Hasher) Hash(password string) (string, error) + func (h *Hasher) Verify(password, encoded string) (bool, error) + type Params struct + Memory uint32 + Threads uint8 + Time uint32 + func DefaultParams() Params