Show / Hide Table of Contents

ResetRetryCommand Constructor

ResetRetryCommand(ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

Build a new Command object to reset the PIN using the PUK (PIN Unblocking Key).

C#
public ResetRetryCommand(ReadOnlyMemory<byte> puk, ReadOnlyMemory<byte> newPin)

Parameters

Type Name Description
ReadOnlyMemory<byte> puk

The current PUK.

ReadOnlyMemory<byte> newPin

The new PIN.

Exceptions

Type Condition
ArgumentException

The PIN or PUK is an invalid length.

Remarks

To reset the PIN is to set the PIN to a new value, even if you don't know what the old value is. This is possible if you know what the PUK is. This command is similar to ChangeReferenceDataCommand. That command changes the PIN if you know the current PIN.

In order to reset the PIN, the caller must supply the PUK and the new PIN. In this class, the PINs and PUKs are supplied as ReadOnlyMemory<byte>. It is possible to pass a byte[], because it will be automatically cast.

This class will copy references to the PIN and PUK (not the values). This means that you can overwrite the PIN and PUK in your byte arrays only after this class is done with it. It will no longer need the PIN or PUK after calling connection.SendCommand.

Both the PIN and PUK are 6 to 8 bytes long.

In this article
Back to top Generated by DocFX