def download_encrypted_blob(bucket_name, source_blob_name, destination_file_name, base64_encryption_key):
 storage_client = storage.Client()
 bucket = storage_client.get_bucket(bucket_name)
 encryption_key = base64.b64decode(base64_encryption_key)
 blob = Blob(source_blob_name, bucket, encryption_key=encryption_key)
 blob.download_to_filename(destination_file_name)
 print 'Blob {} downloaded to {}.'.format(source_blob_name, destination_file_name)

def download_encrypted_blob ( bucket_name , source_blob_name , destination_file_name , base64_encryption_key ) : storage_client = storage . Client ( ) bucket = storage_client . get_bucket ( bucket_name ) encryption_key = base64 . b64decode ( base64_encryption_key ) blob = Blob ( source_blob_name , bucket , encryption_key = encryption_key ) blob . download_to_filename ( destination_file_name ) print 'Blob {} downloaded to {}.' . format ( source_blob_name , destination_file_name )
downloads a previously-encrypted blob from google cloud storage .