NAME
Apertur::SDK::Crypto - Image encryption for Apertur uploads
SYNOPSIS
use Apertur::SDK::Crypto qw(encrypt_image);
my $result = encrypt_image($image_bytes, $public_key_pem);
# $result->{encrypted_key} - Base64-encoded RSA-wrapped AES key
# $result->{iv} - Base64-encoded 12-byte IV
# $result->{encrypted_data} - Base64-encoded AES-256-GCM ciphertext + tag
# $result->{algorithm} - "RSA-OAEP+AES-256-GCM"
DESCRIPTION
Encrypts image data using AES-256-GCM with a random key, then wraps the AES key using RSA-OAEP with SHA-256. Requires optional dependencies Crypt::OpenSSL::RSA and CryptX; these are loaded at runtime only when encryption is actually used.