dOPC Client Toolkit
Close
ua.client.TuaKeypair
ua_client_TuaKeypair

Class property to handle public and private keys

TuaKeypair = class(TPersistent);
class TuaKeypair : public TPersistent;

This class is used to handle public and private keys for the security connect process and for the certificate authentication method. 

Once you have created a certificate, you can load the public and private keys into the component at run time or design time. 

At design time: 

To load the certificate at design time, you can use the property editor of the SecurityKeypair property. You can open this editor by double clicking on (TuaKeypair) or by clicking on the 3 dots (...) of the "SecurityKeypair" property. 

At runtime: 

To load the your certificate at run time you can use e.g. following methods:

dOPCUAClient.SecurityKeypair.Publickey.FromFile('c:\test\mypublickey.der'); dOPCUAClient.SecurityKeypair.Privatekey.FromFile('c:\test\myprivate.der');

Public and Private key are type of ByteString. This type is a normal string but has a helper class with following methods:

function ToBytes: TBytes; procedure ToFile(Filename: string); procedure ToStream(Stream: TStream); procedure FromBytes(Key: TBytes); procedure FromFile(FileName: string); procedure FromStream(Stream: TStream);
Kassl GmbH Copyright © 2024. All rights reserved.