Exemple #1
0
 def test_panEncryptionAlgo0(self):
     pan_in = '4876010123456789012'
     panEnc, pan = pci.encrypt(pan_in, None, '00', self.depco)
     # self.assertEqual(pan, pan_in.encode('hex'))
     six.assertRegex(self, panEnc, r'00\d+')
     panClr, data = pci.decrypt(panEnc, self.depco)
     self.assertEqual(pan_in, panClr)
Exemple #2
0
 def test_panDecryptionAlgo0(self):
     panEnc = '00039D2E071313F75875EA035D63113CACF38B77C516C542EBC49ADD7C20BC0906BA7CE55F14BE58C0F6'
     panClr, data = pci.decrypt(panEnc, self.depco)
     self.assertEqual('5488000970456125', panClr)
Exemple #3
0
 def test_panEncryptionAlgo2(self):
     pan_in = '4876010123456789012'
     panEnc, pan = pci.encrypt(pan_in, '00', '02', self.depco)
     six.assertRegex(self, panEnc, r'0200[A-F0-9]+')
     panClr, data = pci.decrypt(panEnc, self.depco)
     self.assertEqual(pan_in, panClr)