encrypt

package
v0.0.0-...-2962412 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MinPasswordLength = 8

Minimum length for password

View Source
const SaltSizeBytes = 16

Recommended salt size based on https://en.wikipedia.org/wiki/Argon2#Algorithm

Variables

This section is empty.

Functions

func AEADFromPassword

func AEADFromPassword(password string, salt []byte) (cipher.AEAD, error)

func Decrypt

func Decrypt(encryptedMsg []byte, aead cipher.AEAD) ([]byte, error)

func Encrypt

func Encrypt(msg []byte, aead cipher.AEAD) ([]byte, error)

func GenerateSalt

func GenerateSalt() ([]byte, error)

func GetPassword

func GetPassword(withConfirm bool) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL