Documentation
¶
Index ¶
- func CalculateChecksum(data []byte) string
- func DecryptValue(encryptedData, key []byte) ([]byte, error)
- func DecryptWithPassphrase(encryptedData []byte, passphrase string) ([]byte, error)
- func DeriveKey(password []byte, saltEnclave *memguard.Enclave) (*memguard.LockedBuffer, error)
- func EncryptValue(value, key []byte) ([]byte, error)
- func EncryptWithPassphrase(data []byte, passphrase string) ([]byte, error)
- func IsWeakKey(key []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateChecksum ¶
CalculateChecksum calculates SHA-256 checksum of data
func DecryptValue ¶
DecryptValue decrypts a value using XChaCha20-Poly1305 AEAD cipher
func DecryptWithPassphrase ¶
DecryptWithPassphrase decrypts data using a passphrase
func EncryptValue ¶
EncryptValue is a helper function to encrypt values with a key
func EncryptWithPassphrase ¶
EncryptWithPassphrase encrypts data using a passphrase with PBKDF2 + ChaCha20-Poly1305
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.