argon2

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CipherTextMinLength = argon2SaltLength + chacha20poly1305.CipherTextMinLength
)

Variables

This section is empty.

Functions

func Decrypt added in v0.5.0

func Decrypt(ciphertext, password []byte, compression bool) ([]byte, error)

func Encrypt added in v0.5.0

func Encrypt(data, password []byte, compression bool) ([]byte, error)

func GenerateKeyForPassword added in v0.3.0

func GenerateKeyForPassword(password []byte, keyLength uint32) (key, salt []byte, err error)

GenerateKeyForPassword generates a key for a password.

func GenerateKeyForPasswordAndSalt added in v0.3.0

func GenerateKeyForPasswordAndSalt(password, salt []byte, keyLength uint32) (key []byte, err error)

GenerateKeyForPasswordAndSalt generates a key for a password and salt.

func Hash

func Hash(data []byte, length uint32) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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