Documentation ¶
Index ¶
- func Decrypt(encrypted, key []byte) (plaintext []byte, err error)
- func DecryptChaCha(encryptedMsg []byte, aead cipher.AEAD) (encrypted []byte, err error)
- func Encrypt(plaintext, key []byte) (encrypted []byte, err error)
- func EncryptChaCha(plaintext []byte, aead cipher.AEAD) (encrypted []byte, err error)
- func GenSalt(n int) []byte
- func NewArgon2(passphrase []byte, userSalt []byte) (aead cipher.AEAD, salt []byte, err error)
- func Pbkdf2(passphrase, userSalt []byte) (key, salt []byte, err error)
- func ReadPassword(prompt string) ([]byte, error)
- func Scrypt(passphrase, userSalt []byte) (key, salt []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptChaCha ¶
DecryptChaCha will encrypt ChaCha20-Poly1305 using the pre-generated key https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305
func EncryptChaCha ¶
EncryptChaCha will encrypt ChaCha20-Poly1305 using the pre-generated key https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305
func NewArgon2 ¶
NewArgon2 generates a new key based on a passphrase and salt using argon2 https://pkg.go.dev/golang.org/x/crypto/argon2
func ReadPassword ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.