Loading card key to reader key slot using standard PCSC functions. The caller must set key structure/number to a setting that works well with their reader.

Namespace: CardWerk.SmartCard.CardModule.MifareClassic
Assembly: CardWerk.SmartCard.CardModule.MifareClassic (in CardWerk.SmartCard.CardModule.MifareClassic.dll)

Public Function LoadKey( _ 
ByVal keyStructure As Integer, _ 
ByVal keyNumber As Integer, _ 
ByVal keyValue As Byte() _ 
) As Boolean
This language is not supported or no code example is available.
public bool LoadKey( 
int keyStructure
int keyNumber
byte[] keyValue 
)
This language is not supported or no code example is available.
public:  
bool LoadKey( 
int keyStructure
int keyNumber
array< Byte >^ keyValue 
)
This language is not supported or no code example is available.
public function LoadKey( 
keyStructure : int
keyNumber : int
keyValue : byte[] 
) : boolean;
This language is not supported or no code example is available.

Parameters

keyStructure
Type: int

info about key type (A/B) and memory type (volatile/non volatile)

keyNumber
Type: int

Key slot. This is a reader-specific slot index.

keyValue
Type: byte[]

6-byte Mifare key that will be loaded to reader key slot.

Return Value

Type: bool

True if it succeeds, false if it fails.

Exception type Condition

Exception

Thrown when an exception error condition occurs.

.NET Framework

Supported in: 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

.NET Core

Supported in: 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0

.NET Standard

Supported in: 2.0