cybersecurity · beginner · ~15 min · safe pentest lab
Classify the UID size.
Classify an ISO14443 UID by length. UIDs are 4 (single), 7 (double), or 10 (triple) bytes; the length signals the card generation and cascade level.
Implement int uid_is_single(int len) that returns 1 if len == 4, else 0.
len: the UID length in bytes the grader passes.Returns int: 1 if len is 4 (single-size), else 0.
uid_is_single(4) -> 1
uid_is_single(7) -> 0 (double-size)
An int len: the UID length in bytes.
An int: 1 if len == 4, else 0.
Single-size UID is exactly 4 bytes.
int uid_is_single(int len) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.