mifare_desfire_des_key_new(3) mifare_desfire_3des_key_new

LIBRARY

Mifare card manipulation library (libfreefare, -lfreefare)

SYNOPSIS

In freefare.h Ft MifareDESFireKey Fn mifare_desfire_des_key_new uint8_t value[8] Ft MifareDESFireKey Fn mifare_desfire_3des_key_new uint8_t value[16] Ft MifareDESFireKey Fn mifare_desfire_3k3des_key_new uint8_t value[24] Ft MifareDESFireKey Fn mifare_desfire_aes_key_new uint8_t value[16] Ft MifareDESFireKey Fn mifare_desfire_des_key_new_with_version uint8_t value[8] Ft MifareDESFireKey Fn mifare_desfire_3des_key_new_with_version uint8_t value[16] Ft MifareDESFireKey Fn mifare_desfire_3k3des_key_new_with_version uint8_t value[24] Ft MifareDESFireKey Fn mifare_desfire_aes_key_new_with_version uint8_t value[16] uint8_t version Ft uint8_t Fn mifare_desfire_key_get_version MifareDESFireKey key Ft void Fn mifare_desfire_key_set_version MifareDESFireKey key uint8_t version Ft void Fn mifare_desfire_key_free MifareDESFireKey key

DESCRIPTION

The Fn mifare_desfire_key_* family of functions allows management of Mifare DESFire keys.

The Fn mifare_desfire_des_key_new , Fn mifare_desfire_3des_key_new , Fn mifare_desfire_3k3des_key_new and Fn mifare_desfire_ades_key_new alocate a new key with the provided data value The key version is set to 0

The Fn mifare_desfire_des_key_new_with_version , Fn mifare_desfire_3des_key_new_with_version , Fn mifare_desfire_3k3des_key_new_with_version and Fn mifare_desfire_aes_key_new_with_version functions are equivalent to the previous functions except that the key version is read from value (DES, 3DES, 3K3DES) or set to version (AES).

The version of a Vt MifareDESFireKey can be extracted using Fn mifare_desfire_key_get_version and changed using Fn mifare_desfire_key_set_version.

The Fn mifare_desfire_key_free has to be called for each MifareDESFireKey after usage to reclaim memory.

RETURN VALUES

Key allocations functions return the allocaed key of NULL on failure.

AUTHORS

An Romain Tartiere Aq [email protected]