crypto

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateChecksum

func CalculateChecksum(data []byte) string

CalculateChecksum calculates SHA-256 checksum of data

func DecryptValue

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

DecryptValue decrypts a value using XChaCha20-Poly1305 AEAD cipher

func DecryptWithPassphrase

func DecryptWithPassphrase(encryptedData []byte, passphrase string) ([]byte, error)

DecryptWithPassphrase decrypts data using a passphrase

func DeriveKey

func DeriveKey(password []byte, saltEnclave *memguard.Enclave) (*memguard.LockedBuffer, error)

func EncryptValue

func EncryptValue(value, key []byte) ([]byte, error)

EncryptValue is a helper function to encrypt values with a key

func EncryptWithPassphrase

func EncryptWithPassphrase(data []byte, passphrase string) ([]byte, error)

EncryptWithPassphrase encrypts data using a passphrase with PBKDF2 + ChaCha20-Poly1305

func IsWeakKey

func IsWeakKey(key []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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