libfreefare/test/test_create_trailer_block.c

20 lines
458 B
C
Raw Normal View History

#include "test.h"
#include "mifare_classic.h"
2009-12-21 14:58:53 +01:00
DEFINE_TEST(test_create_trailer_block)
{
do {
MifareClassicBlock data;
MifareClassicKey key_a = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
MifareClassicKey key_b = { 0xde, 0xad, 0xbe, 0xef, 0xff, 0xff };
mifare_classic_trailer_block (&data, key_a, 0, 0, 0, 4, 0x42, key_b);
assertEqualMem (data, "\xff\xff\xff\xff\xff\xff\xff\x07\x80\x42\xde\xad\xbe\xef\xff\xff", sizeof (data));
} while (0);
}