Helper function that encodes the given PIN as required by this CardPinControl.

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

Public Function EncodePin( _ 
ByVal sPin As String
) As Byte()
This language is not supported or no code example is available.
public byte[] EncodePin( 
string sPin 
)
This language is not supported or no code example is available.
public:  
array< Byte >^ EncodePin( 
String^ sPin 
)
This language is not supported or no code example is available.
public function EncodePin( 
sPin : String 
) : byte[];
This language is not supported or no code example is available.

Parameters

sPin
Type: string

The PIN to be encoded.

Return Value

Type: byte[]

Returns a byte array that contains the encoded PIN. The length of the byte array depends on the length of the PIN and the selected encoding. If a BCD encoding is selected, and the PIN has an odd length, then the final nibble will have all bits set.

If the given PIN cannot be encoded, then null is returned.

The given PIN will be checked whether it can be encoded according to the properties of this class. If not, then null will be returned.

.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