crypto

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SpartaDefaults = argon2.Params{
	Time:    1,
	Memory:  64 * 1024,
	Threads: uint8(runtime.NumCPU()),
	KeyLen:  64,
}

SpartaDefaults holds the default argon2 values. Based on official recommendations and suggestions.

Functions

func Decrypt

func Decrypt(key *[]byte, encrypted []byte) ([]byte, error)

Decrypt is the initial decryption function.

func Encrypt

func Encrypt(key *[]byte, content []byte) []byte

Encrypt is the initial encryption function.

func GeneratePasswordHash

func GeneratePasswordHash(password string) ([]byte, string, error)

GeneratePasswordHash returns the key, storage hash and an eventual error

func SaveNewPasswordHash

func SaveNewPasswordHash(p, u string, a fyne.App) ([]byte, error)

SaveNewPasswordHash saves the hash of the password.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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