def testWithNUL(self): self.assertEqual( a2s( list(range(ord('a'), ord('d') + 1)) + [0] * 3 + list(range(ord('e'), ord('i') + 1))), 'abcd')
def testWithNULNotPrint(self): self.assertEqual( a2s( list(range(ord('a'), ord('d') + 1)) + [0] * 3 + list(range(ord('e'), ord('i') + 1)), False), 'abcd\0\0\0efghi')
def testSimple(self): self.assertEqual(a2s(range(ord('a'), ord('d') + 1)), 'abcd')
def testDecrypt(self): z = xtea_decrypt(bytearray('0123456789012345', 'utf-8'), bytearray(x2a('B6 7C 01 66 2F F6 96 4A'))) self.assertEqual(a2s(z), 'ABCDEFGH')
def testWithNULNotPrint(self): self.assertEqual( a2s(list(range(ord('a'), ord('d')+1)) + [0]*3 + list(range(ord('e'), ord('i')+1)), False), 'abcd\0\0\0efghi')
def testWithNUL(self): self.assertEqual( a2s(list(range(ord('a'), ord('d')+1)) + [0]*3 + list(range(ord('e'), ord('i')+1))), 'abcd')