Esempio n. 1
0
def test_real_response_rmtf2():
    # Real response from a new (2018) Barclays card using RMTF2 response format.
    data = unformat_bytes(
        """77 1E 9F 27 01 80 9F 36 02 00 16 9F 26 08 29 9C C8 F1 0B 9B C8
                             30 9F 10 07 06 0B 0A 03 A4 90 00""")
    res = RAPDU.unmarshal(data)
    assert get_cap_value(res, ipb=BARCLAYS_IPB, psn=None) == 36554800
Esempio n. 2
0
 def test_pinsentry_equivalence(self):
     # Real response from barclays-pinsentry.c, with its calculated response
     data = unformat_bytes(
         '80 12 80 09 5F 0F 9D 37 98 E9 3F 12 9A 06 0A 0A 03 A4 90 00 90 00'
     )
     res = RAPDU.unmarshal(data)
     self.assertEqual(get_cap_value(res), 46076570)
Esempio n. 3
0
def test_real_response_rmtf1():
    # Real response from barclays-pinsentry.c, with its calculated response.
    # This was an older card which used the RMTF1 response format
    data = unformat_bytes(
        "80 12 80 09 5F 0F 9D 37 98 E9 3F 12 9A 06 0A 0A 03 A4 90 00 90 00")
    res = RAPDU.unmarshal(data)
    assert get_cap_value(res, ipb=BARCLAYS_IPB, psn=None) == 46076570