

def fetch_digest(self, bucket, key):
    'Loads a digest by key from S3.\n\n        Returns the JSON decode data and GZIP inflated raw content.\n        '
    client = self._client_provider.get_client(bucket)
    result = client.get_object(Bucket=bucket, Key=key)
    try:
        digest = zlib.decompress(result['Body'].read(), (zlib.MAX_WBITS | 16))
        digest_data = json.loads(digest.decode())
    except (ValueError, ZLibError):
        raise InvalidDigestFormat(bucket, key)
    if (('signature' not in result['Metadata']) or ('signature-algorithm' not in result['Metadata'])):
        raise DigestSignatureError(bucket, key)
    digest_data['_signature'] = result['Metadata']['signature']
    digest_data['_signature_algorithm'] = result['Metadata']['signature-algorithm']
    return (self, digest)

dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/validation.py DigestProvider.fetch_digest/VarMisuse@164/262 `digest_data`->`self`