PqForgeAsync extension

Engine-pluggable (and optionally hybrid) one-shot envelope encryption.

on

Methods

decryptAsync(Uint8List recipientSecretKey, PqEnvelope envelope, {Uint8List? recipientKexSecretKey, String? recipientKeyId, PqForgeAeadEngine? engine, Uint8List? aad, Uint8List? signerPublicKey}) Future<Uint8List>

Available on PqForge, provided by the PqForgeAsync extension

Decrypts a one-shot envelope on engine, auto-detecting hybrid envelopes (hybridKex marker), a non-default AEAD suite (aeadSuite marker — the engine is rebuilt on the same provider to match), and multi-recipient envelopes (recipients[] entries).
encryptAsync(Uint8List recipientPublicKey, Uint8List plaintext, {Uint8List? recipientKexPublicKey, List<PqRecipientSpec> additionalRecipients = const [], String? recipientKeyId, PqForgeAeadEngine? engine, PqForgeProfile? profile, Uint8List? aad, Map<String, Object?> metadata = const {}, Uint8List? signerSecretKey, PqSignatureAlgorithm? signatureAlgorithm, String? signerKeyId}) Future<PqEnvelope>

Available on PqForge, provided by the PqForgeAsync extension

Encrypts plaintext into a one-shot envelope, running the DEM stage on engine (default: the package:cryptography AES-256-GCM backend).