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



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

Property Value

Valid values of this property are in the range from 0 to 2147483647 (Int32.MaxValue).

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 MinimumKeySize. The default value of MinimumKeySize, 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