NET API
HSM Dinamo
Loading...
Looking for...
No entries found
dukpt.cs

Example of dukpt generation.

See Note on examples.
using System;
using System.Collections.Generic;
using System.Text;
using Dinamo;
using Dinamo.Hsm;
namespace TesteNF
{
class Program
{
static void Main(string[] args)
{
string address = "10.0.62.16";
string user = "master";
string pass = "12345678" ;
din.Connect(address, user, pass);
byte[] pbBDK= new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 };
string bdkName = din.GenBDKName(pbBDK);
din.GenerateKey(bdkName, DinamoClient.KEY_ALG.ALG_3DES_112, true);
byte[] pbCTR = new byte[] {0x00, 0x00, 0x00, 0x00, 0x00 };
string dukptName = din.GenDUKPT(pbBDK, pbCTR, DinamoApi.NEW_DUKPT_MODE_IPEK);
din.RemoveObject(bdkName);
din.RemoveObject(dukptName);
din.Disconnect(true);
}
}
}
Low-level class for accessing the HSM. To use this class you need to understand more ...
Definition DinamoApi.cs:15
const Int32 NEW_DUKPT_MODE_IPEK
Definition DinamoApi.cs:1400
API class for accessing HSM functionalities Dinamo. In this class you can program using...
Definition DinamoClient.cs:93
KEY_ALG
Definition DinamoClient.cs:227
string GenBDKName(byte[] pbKSI)
Generates the BDK name from a KSI (Key Serial Identification).
Definition DinamoClient.cs:4265
string GenDUKPT(byte[] pbKSI, byte[] pbDID_CTR, uint dwParam)
Generates a DUKPT key within the HSM using a KSI (Key Serial Identification),...
Definition DinamoClient.cs:4310
IntPtr GenerateKey(string KeyId, DinamoClient.KEY_ALG Alg, bool Exportable)
Generates a permanent key in the HSM.
Definition DinamoClient.cs:1891
void RemoveObject(string ObjectId)
Removes an object from the HSM.
Definition DinamoClient.cs:2397
void Connect(string User, string Password)
Establishes an encrypted connection to the HSM using the load balance settings.
Definition DinamoClient.cs:562
void Disconnect(bool flagClose)
Terminates the connection to the HSM.
Definition DinamoClient.cs:814
Namespace denoting a set of functions for accessing the HSM Dinamo and their respective exceptions.
Definition DinamoClient.cs:12
Definition DinamoClient.cs:12