Inhaltsverzeichnis
CryptoConfig.DefaultMode Property
Gets or sets the global crypto mode.
Definition
namespace WvdS.System.Security.Cryptography public static CryptoMode DefaultMode { get; set; }
Property Value
| Type | CryptoMode |
| Default Value | CryptoMode.Classic |
Remarks
This property determines the default behavior of all extension methods when no explicit CryptoMode is passed.
| Value | Behavior |
|---|---|
| Classic | No PQ extensions |
| Hybrid | RSA/ECDSA + ML-DSA |
| PostQuantum | ML-DSA/ML-KEM only |
Examples
Global Configuration
// At application startup CryptoConfig.DefaultMode = CryptoMode.Hybrid; // All subsequent operations use Hybrid var cert = request.CreateSelfSigned(notBefore, notAfter); // cert.HasPqSignature() == true
Override per Operation
CryptoConfig.DefaultMode = CryptoMode.Classic; // This operation uses PostQuantum anyway var pqCert = request.CreateSelfSigned( notBefore, notAfter, CryptoMode.PostQuantum);
Thread Safety
This property is thread-safe. Changes are immediately visible to all threads.
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