Decrypts ProcessData result with comm keys

        :param args:
        :param kwargs:
        :return:

def decrypt_result(self, *args, **kwargs):
        """
        Decrypts ProcessData result with comm keys

        :param args:
        :param kwargs:
        :return:
        """
        if self.response is None:
            raise ValueError('Empty response')
        if self.response.response is None \
                or 'result' not in self.response.response \
                or self.response.response['result'] is None:
            raise ValueError('No result data')

        res_hex = self.response.response['result']

        # Strip out the plaintext part
        plain_length = bytes_to_long(from_hex(res_hex[0:4]))
        if plain_length > 0:
            res_hex = res_hex[4 + plain_length:]
        else:
            res_hex = res_hex[4:]

        # Optionally strip trailing _... string
        idx_trail = res_hex.find('_')
        if idx_trail != -1:
            res_hex = res_hex[0:idx_trail]

        # Decode hex coding
        res_bytes = from_hex(res_hex)

        # Crypto stuff - check the length & padding
        if len(res_bytes) < 16:
            raise InvalidResponse('Result too short')

        mac_given = res_bytes[-16:]
        res_bytes = res_bytes[:-16]

        # Check the MAC
        mac_computed = cbc_mac(self.uo.mac_key, res_bytes)
        if not str_equals(mac_given, mac_computed):
            raise CryptoError('MAC invalid')

        # Decrypt
        decrypted = aes_dec(self.uo.enc_key, res_bytes)
        if len(decrypted) < 1 + 4 + 8 or decrypted[0:1] != bchr(0xf1):
            raise InvalidResponse('Invalid format')

        self.resp_object_id = bytes_to_long(decrypted[1:5])
        self.resp_nonce = EBUtils.demangle_nonce(decrypted[5:5 + EBConsts.FRESHNESS_NONCE_LEN])
        self.decrypted = decrypted[5 + EBConsts.FRESHNESS_NONCE_LEN:]
        self.decrypted = PKCS7.unpad(self.decrypted)
        return self.response