Helper function that encodes the given PIN as required by this CardPinControl.
Namespace:
CardWerk.SmartCard.Util
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)
Public Shared Function EncodePin( _
ByVal pinEncodingIdentifier As PinEncodingIdentifier, _
ByVal pin As String _
) As Byte()
This language is not supported or no code example is available.
public static byte[] EncodePin(
PinEncodingIdentifier pinEncodingIdentifier,
string pin
)
This language is not supported or no code example is available.
public:
static array< Byte >^ EncodePin(
PinEncodingIdentifier pinEncodingIdentifier,
String^ pin
)
This language is not supported or no code example is available.
Parameters
- pinEncodingIdentifier
-
Type: PinEncodingIdentifier
.
- pin
-
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.
Exception type | Condition |
---|---|
Thrown when one or more required arguments are null. |
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.