OPC Studio User's Guide and Reference
MinimumKeySizeForRsa Property (CertificateGenerationParameters)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security Namespace > CertificateGenerationParameters Class : MinimumKeySizeForRsa Property
Minimum key size of the generated certificate (in bits). For RSA only.
Syntax
'Declaration
 
<DataMemberAttribute()>
<ValueLimitsAttribute(0, 2147483647)>
<WellKnownValueAttribute(0)>
Public Property MinimumKeySizeForRsa As Integer
'Usage
 
Dim instance As CertificateGenerationParameters
Dim value As Integer
 
instance.MinimumKeySizeForRsa = value
 
value = instance.MinimumKeySizeForRsa
[DataMember()]
[ValueLimits(0, 2147483647)]
[WellKnownValue(0)]
public int MinimumKeySizeForRsa {get; set;}
[DataMember()]
[ValueLimits(0, 2147483647)]
[WellKnownValue(0)]
public:
property int MinimumKeySizeForRsa {
   int get();
   void set (    int value);
}

Property Value

The default value of this property is 0.

Some well-known (commonly used) values of this property are: 0, 1024, 2048, 3072, 4096.

Exceptions
ExceptionDescription

The value of an argument is outside the allowable range of values as defined by the invoked method.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

The underlying generation certificate mechanism will choose a key size that is greater or equal to MinimumKeySizeForRsa. The default value of MinimumKeySizeForRsa, which is zero, causes the certificate generation mechanism to choose the default key size.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also