crypto

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength      = errors.New("invalid scrypt key length")
	ErrMismatchedPassword = errors.New("password does not match scrypt key")
)

Functions

func Decrypt

func Decrypt(encryptedData []byte, key []byte) ([]byte, error)

func Encrypt

func Encrypt(data []byte, key []byte) ([]byte, error)

func GenerateEncryptKey

func GenerateEncryptKey(data []byte) []byte

func Hash256

func Hash256(data []byte) []byte

func Scrypt

func Scrypt(password string) []byte

func VerifyScrypt

func VerifyScrypt(password string, scryptKey []byte) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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