Пример #1
0
 def test_mul(self):
     '''Tests the __mul method
     test cases taken from FIPS 197 section 4.2.1'''
     self.assertEqual(AES._AES__mul(0x57, 0x13), 0xfe)  # @UndefinedVariable
     self.assertEqual(AES._AES__mul(0x13, 0x57), 0xfe)  # @UndefinedVariable
     self.assertEqual(AES._AES__mul(0x57, 0x83), 0xc1)  # @UndefinedVariable
     self.assertEqual(AES._AES__mul(0x83, 0x57), 0xc1)  # @UndefinedVariable