MIFARE_DESFIRE_AID(3)

πŸ’– MIFARE_DESFIRE_AID πŸ’–

okay bestie, so this is a page from the Library Functions Manual β€” it's MIFARE_DESFIRE_AID(3), and it's literally the AID-manipulation corner of the freefare universe. yes, AID like Application ID, not like "help me". let's get into it 🫢


🌸 NAME 🌸

mifare_desfire_aid_new, mifare_desfire_aid_new_with_mad_aid, mifare_desfire_aid_get_aid β€” Mifare DESFire AID Manipulation Functions

like, the whole lil squad of functions that handle Mifare DESFire AIDs. periodt.


✨ LIBRARY ✨

Mifare card manipulation library β€” that's libfreefare, and you link it with -lfreefare iykyk.


πŸŽ€ SYNOPSIS πŸŽ€

#include <freefare.h>

MifareDESFireAID
mifare_desfire_aid_new(uint32_t aid);

MifareDESFireAID
mifare_desfire_aid_new_with_mad_aid(MadAid mad_aid, uint8_t n);

uint32_t
mifare_desfire_aid_get_aid(MifareDESFireAID aid);

πŸ’… DESCRIPTION πŸ’…

The mifare_desfire_aid_*() functions let you manage Mifare DESFire AIDs. they're giving full AID custody, honestly.

  • mifare_desfire_aid_new() β€” returns a brand new Mifare DESFire AID whose value is aid. simple. iconic. no notes. πŸ’–
  • mifare_desfire_aid_new_with_mad_aid() β€” returns a new Mifare DESFire AID built from a Mifare Classic AID mad_aid, using n as the last nibble of the new AID. yes bestie, the final nibble, that's the whole vibe. ✨
🚨 okay listen up, this part matters: both mifare_desfire_aid_new() and mifare_desfire_aid_new_with_mad_aid() allocate memory, and you must reclaim that memory with free(3). not optional, not "later", not "the OS will handle it". free it. πŸ’€
  • mifare_desfire_aid_get_aid() β€” hands you back the aid of the Mifare DESFire AID you passed in. lowkey the simplest one here and honestly? she ate. πŸ”₯

🌈 RETURN VALUES 🌈

The allocation functions return the allocated AID when everything slays, and NULL otherwise. that's it, that's the whole deal. no cap. πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, bestie, they're all connected fr fr. πŸ“


πŸ‘‘ AUTHORS πŸ‘‘

Romain Tartiere <romain@il4p.org> β€” the main character who wrote all this. respect. 🫢


and that's the whole page, gorgeous πŸ’– this came from the Debian crew, dated September 3, 2010, and it's the MIFARE_DESFIRE_AID(3) manual β€” so if you ever forget which nibble goes where, you know exactly where to find me. mwah πŸ’…βœ¨