'Return a decrypted credential reference.'

def _decrypt_credential(self, credential):

    if (credential['type'] == 'ec2'):
        decrypted_blob = json.loads(self.credential_provider_api.decrypt(credential['encrypted_blob']))
    else:
        decrypted_blob = self.credential_provider_api.decrypt(credential['encrypted_blob'])
    credential['blob'] = decrypted_blob
    credential.pop('key_hash', None)
    credential.pop('encrypted_blob', None)
    return credential
