Versions in this module Expand all Collapse all v0 v0.2.0 May 1, 2026 v0.1.0 Feb 22, 2026 Changes in this version + const AESKeySize + const HKDFKeyLength + const KDFProfileInteractive + const KDFProfileModerate + const KDFProfileSensitive + const MinArgon2MemoryKiB + const MinArgon2Parallel + const MinArgon2Time + func CompareArgon2idKey(passphrase string, salt []byte, params Argon2idParams, expectedKey []byte) (bool, error) + func CopyBytes(src []byte) []byte + func DecryptAES(cipherText, rawKey []byte) ([]byte, error) + func DecryptAESWithAAD(cipherText, rawKey, aad []byte) ([]byte, error) + func DeriveArgon2idKey(passphrase string, salt []byte, params Argon2idParams) ([]byte, error) + func EncryptAES(plainText, rawKey []byte) ([]byte, error) + func EncryptAESWithAAD(plainText, rawKey, aad []byte) ([]byte, error) + func GenerateSelfSignedCert() (tls.Certificate, error) + func HKDF(seed []byte, salt []byte, info []byte) ([]byte, error) + func HexDecode(s string) ([]byte, error) + func HexEncode(b []byte) string + func NewAESKey() ([]byte, error) + func NewTwoSecretKey(passphrase string, saltPass []byte, argonParams Argon2idParams, ...) ([]byte, error) + func Normalize(s string) string + func RandomBytes(n int) ([]byte, error) + func RandomChars(n int) (string, error) + func RandomInt() (int, error) + func RandomIntn(max int) (int, error) + func SharedSecret(priv [32]byte, pub [32]byte) ([32]byte, error) + func ValidateArgon2idParams(p Argon2idParams) error + func WipeArray32(a *[32]byte) + func WipeBytes(b []byte) + func Xor(a, b []byte) ([]byte, error) + type Argon2idParams struct + KeyLen uint32 + MemoryKiB uint32 + Parallelism uint8 + Time uint32 + func Argon2idProfile(name string) (Argon2idParams, error) + func DefaultArgon2idParams() Argon2idParams + type KeyPair struct + Private [32]byte + Public [32]byte + func GenerateX25519Keypair() (KeyPair, error)