|
M5Unit-NFC 0.1.1 git rev:9bb1360
|
NFC-F definitions. More...
Namespaces | |
| namespace | m5 |
| Top level namespace of M5Stack. | |
Functions | |
| uint16_t | m5::nfc::f::get_maximum_block (const Type t) |
| Gets the maximum block. | |
| uint16_t | m5::nfc::f::get_number_of_user_blocks (const Type t) |
| Gets the number of user blocks. | |
| uint16_t | m5::nfc::f::get_first_user_block (const Type t) |
| Gets the first user area block number. | |
| uint16_t | m5::nfc::f::get_last_user_block (const Type t) |
| Gets the last user area block number. | |
| uint8_t | m5::nfc::f::get_maximum_read_blocks (const Type t) |
| Maximum number of blocks that can be read simultaneously. | |
| uint8_t | m5::nfc::f::get_maximum_write_blocks (const Type t) |
| Maximum number of blocks that can be write simultaneously. | |
| bool | m5::nfc::f::is_read_only_lite (const block_t block) |
| Is read only block (Permissions are not considered) | |
| bool | m5::nfc::f::is_read_only_lite_s (const block_t block) |
| Is read only block (Permissions are not considered) | |
| bool | m5::nfc::f::can_read_lite (const block_t block) |
| Can the value of the specified block be read? (Permissions are not considered) | |
| bool | m5::nfc::f::can_read_lite_s (const block_t block) |
| Can the value of the specified block be read? (Permissions are not considered) | |
| bool | m5::nfc::f::make_emulation_polling_memory (uint8_t out[FELICA_PT_MEMORY_SIZE], const PICC &picc) |
| Make ST25R3916 NFC-F passive target memory contents for emulation Polling response. | |
| bool | m5::nfc::f::read_response_blocks (const uint8_t *rbuf, const uint16_t rbuf_len, uint8_t &blocks) |
| Checks a Read Without Encryption answer and takes the number of blocks out of it. | |
| bool | m5::nfc::f::operator== (const PICC &a, const PICC &b) |
| Equal? (Only IDm,PMm) | |
For MAC | |
| bool | m5::nfc::f::make_session_key (uint8_t sk[16], const uint8_t ck[16], const uint8_t rc[16]) |
| Make session key. | |
| bool | m5::nfc::f::generate_mac (uint8_t mac[8], const uint8_t *plain, uint32_t plain_len, const uint8_t *block_data, uint32_t block_len, const uint8_t sk1[8], const uint8_t sk2[8], const uint8_t rc[16]) |
| Generate MAC. | |
| bool | m5::nfc::f::make_personalized_card_key_lite_s (uint8_t card_key[16], const uint8_t master_key[24], const uint8_t id_block[16]) |
| Generate personalized card key for FeliCa Lite-S. | |
NFC-F definitions.
| bool m5::nfc::f::can_read_lite | ( | const block_t | block | ) |
Can the value of the specified block be read? (Permissions are not considered)
| block | Block list element |
| bool m5::nfc::f::can_read_lite_s | ( | const block_t | block | ) |
Can the value of the specified block be read? (Permissions are not considered)
| block | Block list element |
| bool m5::nfc::f::generate_mac | ( | uint8_t | mac[8], |
| const uint8_t * | plain, | ||
| uint32_t | plain_len, | ||
| const uint8_t * | block_data, | ||
| uint32_t | block_len, | ||
| const uint8_t | sk1[8], | ||
| const uint8_t | sk2[8], | ||
| const uint8_t | rc[16] ) |
Generate MAC.
| [out] | mac | MAC |
| plain | Plain blocks (If nullptr, do not use) | |
| plain_len | Length of plain (If zero, do not use) | |
| block_data | Block data | |
| block_len | Length of block_data | |
| sk1 | Session key 1 | |
| sk2 | Session key 2 | |
| rc | Random challenge |
| uint16_t m5::nfc::f::get_first_user_block | ( | const Type | t | ) |
Gets the first user area block number.
| t | PICC type |
| uint16_t m5::nfc::f::get_last_user_block | ( | const Type | t | ) |
Gets the last user area block number.
| t | PICC type |
| uint16_t m5::nfc::f::get_maximum_block | ( | const Type | t | ) |
Gets the maximum block.
| t | PICC type |
| uint8_t m5::nfc::f::get_maximum_read_blocks | ( | const Type | t | ) |
Maximum number of blocks that can be read simultaneously.
| t | PICC type |
| uint8_t m5::nfc::f::get_maximum_write_blocks | ( | const Type | t | ) |
Maximum number of blocks that can be write simultaneously.
| t | PICC type |
| uint16_t m5::nfc::f::get_number_of_user_blocks | ( | const Type | t | ) |
Gets the number of user blocks.
| t | PICC type |
| bool m5::nfc::f::is_read_only_lite | ( | const block_t | block | ) |
Is read only block (Permissions are not considered)
| block | Block list element |
| bool m5::nfc::f::is_read_only_lite_s | ( | const block_t | block | ) |
Is read only block (Permissions are not considered)
| block | Block list element |
| bool m5::nfc::f::make_emulation_polling_memory | ( | uint8_t | out[FELICA_PT_MEMORY_SIZE], |
| const PICC & | picc ) |
Make ST25R3916 NFC-F passive target memory contents for emulation Polling response.
| [out] | out | Output buffer (21 bytes) |
| picc | PICC information for emulation |
| bool m5::nfc::f::make_personalized_card_key_lite_s | ( | uint8_t | card_key[16], |
| const uint8_t | master_key[24], | ||
| const uint8_t | id_block[16] ) |
Generate personalized card key for FeliCa Lite-S.
| [out] | card_key | Personalized card key (16 bytes) |
| master_key | Personalized master key (24 bytes) | |
| id_block | ID block value (16 bytes) |
| bool m5::nfc::f::make_session_key | ( | uint8_t | sk[16], |
| const uint8_t | ck[16], | ||
| const uint8_t | rc[16] ) |
Make session key.
| [out] | sk | Session key (sk1 8byte + sk2 8byte) |
| ck | Card key | |
| rc | Random challenge |
Equal? (Only IDm,PMm)
| a | Left PICC |
| b | Right PICC |
| bool m5::nfc::f::read_response_blocks | ( | const uint8_t * | rbuf, |
| const uint16_t | rbuf_len, | ||
| uint8_t & | blocks ) |
Checks a Read Without Encryption answer and takes the number of blocks out of it.
| rbuf | Received frame, length byte first | |
| rbuf_len | Number of bytes actually received | |
| [out] | blocks | Number of blocks the answer carries, zero when it is rejected |