Enables post-quantum cryptography and initializes the OpenSSL interop.
namespace WvdS.System.Security.Cryptography public static void EnablePostQuantum(CryptoMode mode = CryptoMode.Hybrid)
| Name | Type | Description |
|---|---|---|
| mode | CryptoMode | The mode to enable. Default: CryptoMode.Hybrid |
This method is a convenience function that:
DefaultMode to the specified valueEquivalent to:
CryptoConfig.DefaultMode = mode; CryptoProviderFactory.GetProvider().Initialize();
// Enables Hybrid mode CryptoConfig.EnablePostQuantum(); // Equivalent to: CryptoConfig.EnablePostQuantum(CryptoMode.Hybrid);
// Only for fully PQ-capable environments CryptoConfig.EnablePostQuantum(CryptoMode.PostQuantum);
| DllNotFoundException | OpenSSL library not found |
| InvalidOperationException | OpenSSL version < 3.6 or PQ algorithms not available |
Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional