crypto

package
v0.0.0-...-4e0165b Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKeyString = errors.New("invalid key string")
)
View Source
var (
	ErrPassphraseMismatch = errors.New("incorrect passphrase")
)

Functions

func Decrypt

func Decrypt(ciphertext []byte, key []byte) (plaintext []byte, err error)

func DeriveKey

func DeriveKey(passphrase string) (key []byte, keyString string)

func Encrypt

func Encrypt(plaintext []byte, key []byte) (ciphertext []byte, err error)

func MatchPassphrase

func MatchPassphrase(passphrase, keyString string) (key []byte, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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