Ejemplo n.º 1
0
    def test_distdoc_decrypt_tail(self):
        section = self.section

        key = section.head_key()
        tail = section.tail()
        try:
            decrypted = decrypt_tail(key, tail)
        except NotImplementedError, e:
            if e.message == 'aes128ecb_decrypt':
                # skip this test
                return
            raise
Ejemplo n.º 2
0
    def test_distdoc_decrypt_tail(self):
        section = self.section

        key = section.head_key()
        tail = section.tail()
        decrypted = decrypt_tail(key, tail)
        decompressed = zlib.decompress(decrypted, -15)
        record = read_record(BytesIO(decompressed), 0)
        self.assertEqual(0, record['level'])
        self.assertEqual(HWPTAG_PARA_HEADER, record['tagid'])
        self.assertEqual(22, record['size'])

        self.assertEqual(390, len(decompressed))
Ejemplo n.º 3
0
 def tail_decrypted(self):
     from hwp5.distdoc import decrypt_tail
     key = self.head_key()
     tail = self.tail()
     return decrypt_tail(key, tail)
Ejemplo n.º 4
0
 def tail_decrypted(self):
     from hwp5.distdoc import decrypt_tail
     key = self.head_key()
     tail = self.tail()
     return decrypt_tail(key, tail)