Exemplo n.º 1
0
 def testDecode1(self):
     # Empty sequence
     der = DerOctetString()
     der.decode(b('\x04\x00'))
     self.assertEquals(der.payload, b(''))
     # Small payload
     der.decode(b('\x04\x02\x01\x02'))
     self.assertEquals(der.payload, b('\x01\x02'))
Exemplo n.º 2
0
 def testDecode1(self):
     # Empty sequence
     der = DerOctetString()
     der.decode(b('\x04\x00'))
     self.assertEqual(der.payload, b(''))
     # Small payload
     der.decode(b('\x04\x02\x01\x02'))
     self.assertEqual(der.payload, b('\x01\x02'))
Exemplo n.º 3
0
 def testDecode2(self):
     # Verify that decode returns the object
     der = DerOctetString()
     self.assertEqual(der, der.decode(b('\x04\x00')))
Exemplo n.º 4
0
 def testDecode2(self):
     # Verify that decode returns the object
     der = DerOctetString()
     self.assertEqual(der, der.decode(b('\x04\x00')))