'Attempt to decrypt a header value that may be encrypted.
:param header: the header name
:param value: the header value
:param key: decryption key
:param required: if True then the header is required to be decrypted
and an HTTPInternalServerError will be raised if the
header cannot be decrypted due to missing crypto meta.
:return: decrypted value or the original value if it was not encrypted.
:raises HTTPInternalServerError: if an error occurred during decryption
or if the header value was required to
be decrypted but crypto meta was not
found.'

def _decrypt_header(self, header, value, key, required=False):

    try:
        return self.decrypt_value_with_meta(value, key, required)
    except EncryptionException as err:
        self.logger.error(_('Error    decrypting    header    %(header)s:    %(error)s'), {'header': header, 'error': err})
        raise HTTPInternalServerError(body='Error    decrypting    header', content_type='text/plain')
