Skip to main content

Module implementation

Module implementation 

Source

Structsยง

EncryptionConfig
Encryption configuration.
Encryptor
AES-256-GCM encryptor.

Constantsยง

ENV_ENCRYPTION_KEY ๐Ÿ”’
Environment variable for encryption key.
KEY_SIZE ๐Ÿ”’
Key size for AES-256 (32 bytes / 256 bits).
MAGIC_HEADER
Magic bytes to identify encrypted files. Format: SUBCOG_ENC_V1\0 (14 bytes)
NONCE_SIZE ๐Ÿ”’
Nonce size for AES-256-GCM (12 bytes / 96 bits).

Functionsยง

is_encrypted
Checks if data appears to be encrypted (has magic header).