====== 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|CryptoMode]] | The mode to enable. Default: ''CryptoMode.Hybrid'' | ---- ===== Remarks ===== This method is a convenience function that: - Sets ''DefaultMode'' to 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 ===== * [[.:start|CryptoConfig Class]] * [[.:defaultmode|DefaultMode Property]] * [[en:int:pqcrypt:api:wvds-system-security-cryptography:providers:start|Providers Namespace]] {{tag>method}} ---- //Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//