ML-KEM encapsulation using the fastest available backend.
On Node.js 24.7+ with native PQC support, generates a temporary native
key pair, imports the caller's raw public key via a DER wrapper, and
calls crypto.encapsulate() for hardware-accelerated encapsulation.
Falls back to @noble/post-quantum on older runtimes.
ML-KEM encapsulation using the fastest available backend.
On Node.js 24.7+ with native PQC support, generates a temporary native key pair, imports the caller's raw public key via a DER wrapper, and calls
crypto.encapsulate()for hardware-accelerated encapsulation. Falls back to @noble/post-quantum on older runtimes.