Ref: http://www.nxp.com/documents/data_sheet/MF1S50YYX.pdf Value blocks allow performing electronic purse functions (valid commands are: read, write, increment, decrement, restore, transfer). Value blocks have a fixed data format which permits error detection and correction and a backup management. Value: Signifies a signed 4-byte value. The LSB of a value is stored in the lowest address byte i.e 0x00000012 is stored as 0x12000000. Negative values are stored in standard 2's complement format. For reasons of data integrity and security, a value is stored three times, twice non-inverted and once inverted Adr: Signifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. The address byte is stored four times, twice inverted and non-inverted. During increment, decrement, restore and transfer operations the address remains unchanged. It can only be altered via a write command.

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

Public Class MifareClassicValueBlock
This language is not supported or no code example is available.
public class MifareClassicValueBlock
This language is not supported or no code example is available.
public ref class MifareClassicValueBlock 
This language is not supported or no code example is available.
public class MifareClassicValueBlock
This language is not supported or no code example is available.
Name Description
Public constructor MifareClassicValueBlock() Default constructor.
Top
Name Description
Public method Pack(int, long) Packs value. An example of a valid value block format for the decimal value 1234567 and the block address 17 is shown in Table. First, the decimal value has to be converted to the hexadecimal representation of 0x0012D687. The LSByte of the hexadecimal value is stored in Byte 0, the MSByte in Byte 3. The bit-inverted hexadecimal representation of the value is 0xFFED2978 where the LSByte is stored in Byte 4 and the MSByte in Byte 7. The hexadecimal value of the address in the example is 0x11, the bit inverted hexadecimal value is 0xEE. Table - Value block format example Byte Number 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 Description ---value--- +++VALUE+++ ---value--- ad AD ad AD Values [hex] 87 D6 12 00 78 29 ED FF 87 D6 12 00 11 EE 11 EE.
Public method UnPack(byte[], ref int, ref long) Unpacks value.
Top
Marc, 9/29/2022.

.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