(self, payload, finalkey, enctype, iv)
return payload
Decrypt payload (non-header) part of the buffer
Decrypt payload (non-header) part of the buffer
Decrypt payload ( non - header ) part of the buffer
def decrypt_payload(self, payload, finalkey, enctype, iv):
        'Decrypt payload (non-header) part of the buffer'

        if enctype != 'Rijndael':
            raise ValueError, 'Unsupported decryption type: "%s"'%enctype

        payload = self.decrypt_payload_aes_cbc(payload, finalkey, iv)
        crypto_size = len(payload)

        if ((crypto_size > 2147483446) or (not crypto_size and self.header.ngroups)):
            raise ValueError, "Decryption failed.\nThe key is wrong or the file is damaged"

        import hashlib
        if self.header.contents_hash != hashlib.sha256(payload).digest():
            raise ValueError, "Decryption failed. The file checksum did not match."

        return payload
def decrypt_payload ( self , payload , finalkey , enctype , iv ) : if enctype != 'Rijndael' : raise ValueError , 'Unsupported decryption type: "%s"' % enctype payload = self . decrypt_payload_aes_cbc ( payload , finalkey , iv ) crypto_size = len ( payload ) if ( ( crypto_size > 2147483446 ) or ( not crypto_size and self . header . ngroups ) ) : raise ValueError , "Decryption failed.\nThe key is wrong or the file is damaged" import hashlib if self . header . contents_hash != hashlib . sha256 ( payload ) . digest ( ) : raise ValueError , "Decryption failed. The file checksum did not match." return payload