crypto

package
v0.0.0-...-92ba93c Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptData

func DecryptData(data io.Reader, decryptionKey []byte) io.Reader

DecryptData decrypts data using AES-GCM with nonce (4KB size).

func EncryptData

func EncryptData(data io.Reader, encryptionKey []byte) io.Reader

EncryptData encrypts data using AES-GCM with nonce (4KB chunks).

func GeneratePBEKey

func GeneratePBEKey(password string, salt []byte) []byte

GeneratePBEKey generates a 32-byte encryption key for PBE with salt. This key is used to encrypt/decrypt user files uploaded to the server. The key itself is stored in the keyring.

func GenerateRandomNBytes

func GenerateRandomNBytes(n int) ([]byte, error)

GenerateRandomNBytes generates a random byte slice of length n.

Types

This section is empty.

Jump to

Keyboard shortcuts

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