

def get_key(self, ctxt, key_id, payload_content_type='application/octet-stream'):
    'Retrieves the specified key.\n\n        :param ctxt: contains information of the user and the environment for\n                     the request (nova/context.py)\n        :param key_id: the UUID of the key to retrieve\n        :param payload_content_type: The format/type of the secret data\n\n        :return: SymmetricKey representation of the key\n        :raises Exception: if key retrieval fails\n        '
    try:
        secret = self._get_secret(ctxt, key_id)
        secret_data = self._get_secret_data(secret_data, payload_content_type)
        if (payload_content_type == 'application/octet-stream'):
            key_data = array.array('B', base64.b64decode(secret_data)).tolist()
        else:
            key_data = secret_data
        key = keymgr_key.SymmetricKey(secret.algorithm, key_data)
        return key
    except Exception as e:
        with excutils.save_and_reraise_exception():
            LOG.error(_LE('Error getting key: %s'), e)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/keymgr/barbican.py BarbicanKeyManager.get_key/VarMisuse@41/207 `secret`->`secret_data`