// Notes about travel card data: All data is presented as a pile of bytes,
// and all bytes are expressed in Big Endian format.
Notes about travel card data: All data is presented as a pile of bytes,
and all bytes are expressed in Big Endian format.
Notes about travel card data : All data is presented as a pile of bytes and all bytes are expressed in Big Endian format .
fn read_application_info(app_info: &[u8]) -> (u8, u8, String, u8, bool) {
    (
        get_bits_as_u8(app_info, 0, 4),       // Application Version
        get_bits_as_u8(app_info, 4, 4), // Application Key Version (though the spec sheet marks it as "reserved")
        as_hex_string(&app_info[1..10]), // Application Instance ID (aka the card's unique ID number)
        get_bits_as_u8(app_info, 80, 3), // Platform Type, 0 = NXP DESFire 4kB.
        get_bits_as_u8(app_info, 83, 1) != 0, // SecurityLevel, which is a 1-bit field. 0 = open, 1 = MAC protected.
    )
}
fn read_application_info ( app_info : & [ u8 ] ) -> ( u8 , u8 , String , u8 , bool ) { ( get_bits_as_u8 ( app_info , 0 , 4 ) , // Application Version get_bits_as_u8 ( app_info , 4 , 4 ) , // Application Key Version (though the spec sheet marks it as "reserved") as_hex_string ( & app_info [ 1 .. 10 ] ) , // Application Instance ID (aka the card's unique ID number) get_bits_as_u8 ( app_info , 80 , 3 ) , // Platform Type, 0 = NXP DESFire 4kB. get_bits_as_u8 ( app_info , 83 , 1 ) != 0 , // SecurityLevel, which is a 1-bit field. 0 = open, 1 = MAC protected. ) }
Notes about travel card data: All data is presented as a pile of bytes,
and all bytes are expressed in Big Endian format.
Notes about travel card data : All data is presented as a pile of bytes and all bytes are expressed in Big Endian format .
app_info
&[u8]