ResetRetryCommand Constructor
ResetRetryCommand(ReadOnlyMemory<Byte>, ReadOnlyMemory<Byte>)
Build a new Command object to reset the PIN using the PUK (PIN Unblocking Key).
public ResetRetryCommand(ReadOnlyMemory<byte> puk, ReadOnlyMemory<byte> newPin)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | puk | The current PUK. |
System.ReadOnlyMemory<System.Byte> | newPin | The new PIN. |
Exceptions
Type | Condition |
---|---|
System.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.