crypto

package
v0.0.0-...-93b8736 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: 0BSD Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRandBytes = errors.New("error generating random bytes")
)

Functions

func Key

func Key(password string, salt []byte, iterationCount, keyLength int) []byte

Key derives a secure encryption key from a password using the PBKDF2 key-derivation algorithm with an SHA-256 hash. The returned key will have keyLength bytes.

func RandBytes

func RandBytes(length int) ([]byte, error)

RandBytes generates an arbitrary-length slice of cryptographically-secure pseudorandom bytes.

Types

This section is empty.

Directories

Path Synopsis
Package crypto/aes is a symmetric encryption library built from secure, industry-standard components.
Package crypto/aes is a symmetric encryption library built from secure, industry-standard components.

Jump to

Keyboard shortcuts

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