def _get_secret_data(self,
                         secret,
                         payload_content_type='application/octet-stream'):
        try:
            generated_data = secret.payload
            if payload_content_type == 'application/octet-stream':
                secret_data = base64.b64encode(generated_data)
            else:
                secret_data = generated_data
            return secret_data
        except Exception as e:
            with excutils.save_and_reraise_exception():
                LOG.error(_LE("Error getting secret data: %s"), e)
Retrieves the secret data given a secret and content_type.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/keymgr/barbican.py/BarbicanKeyManager._get_secret_data