Inhaltsverzeichnis
CryptoConfig.EnablePostQuantum Method
Enables post-quantum cryptography and initializes the OpenSSL interop.
Definition
namespace WvdS.System.Security.Cryptography public static void EnablePostQuantum(CryptoMode mode = CryptoMode.Hybrid)
Parameters
| Name | Type | Description |
|---|---|---|
| mode | CryptoMode | The mode to enable. Default: CryptoMode.Hybrid |
Remarks
This method is a convenience function that:
- Sets
DefaultModeto the specified value - Initializes OpenSSL and checks the version
- Loads the crypto provider
Equivalent to:
CryptoConfig.DefaultMode = mode; CryptoProviderFactory.GetProvider().Initialize();
Examples
Standard (Hybrid)
// Enables Hybrid mode CryptoConfig.EnablePostQuantum(); // Equivalent to: CryptoConfig.EnablePostQuantum(CryptoMode.Hybrid);
PostQuantum-Only
// Only for fully PQ-capable environments CryptoConfig.EnablePostQuantum(CryptoMode.PostQuantum);
Exceptions
| DllNotFoundException | OpenSSL library not found |
| InvalidOperationException | OpenSSL version < 3.6 or PQ algorithms not available |
See Also
Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional
Zuletzt geändert: on 2026/01/29 at 11:22 PM