OPC Studio User's Guide and Reference
PrivateKey Property (IPkiCertificate)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security.Cryptography.PkiCertificates Namespace > IPkiCertificate Interface : PrivateKey Property
Syntax
'Declaration
 
<CanBeNullAttribute()>
Property PrivateKey As AsymmetricAlgorithm
'Usage
 
Dim instance As IPkiCertificate
Dim value As AsymmetricAlgorithm
 
instance.PrivateKey = value
 
value = instance.PrivateKey
[CanBeNull()]
AsymmetricAlgorithm PrivateKey {get; set;}
[CanBeNull()]
property AsymmetricAlgorithm^ PrivateKey {
   AsymmetricAlgorithm^ get();
   void set (    AsymmetricAlgorithm^ value);
}

Property Value

This value of this property can be null (Nothing in Visual Basic).

Exceptions
ExceptionDescription

An error occurred during a cryptographic operation.

This is an operation error that depends on factors external to your program, and thus cannot be always avoided. Your code must handle it appropriately.

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