encrypted password column in 8.3.0

Hi,

 

Before 8.3.0, I was using this to retrieve at server side an encrypted password column.

     EntitySchemaQuery query = new EntitySchemaQuery(userConnection.EntitySchemaManager.GetInstanceByName(sSchemaName));
           query.HideSecurityValue  = false;
           var entity = query.GetEntity(userConnection, guid);
           var password = entity.GetTypedColumnValue<string>("PF1Password");

Now, the same code return *****.

Is there any new way to retrieve the encrypted value at server side for 8.3.0 ?

 

Thanks,

Like 0

Like

2 comments
Best reply

Hello Jerome,

Instead of using EntitySchemaQuery.HideSecurityValue to unmask the value of the encrypted string use EntitySchemaQuery.UnmaskColumnValues and set it to true

Here is the example:

var esq = new EntitySchemaQuery(userConnection.EntitySchemaManager, schemaName);
esq.UnmaskColumnValues = true;
esq.AddColumn(encryptedColumnName);
var entity = esq.GetEntity(userConnection, recordId);
var unmaskedString entity.GetColumnValue(encryptedColumnName) as string;

This doesn't work either: 

esq.HideSecurityValueSetting = new EntitySchemaQueryHideSecurityValueSetting(EntitySchemaQueryHideSecurityValueOption.None);

Hello Jerome,

Instead of using EntitySchemaQuery.HideSecurityValue to unmask the value of the encrypted string use EntitySchemaQuery.UnmaskColumnValues and set it to true

Here is the example:

var esq = new EntitySchemaQuery(userConnection.EntitySchemaManager, schemaName);
esq.UnmaskColumnValues = true;
esq.AddColumn(encryptedColumnName);
var entity = esq.GetEntity(userConnection, recordId);
var unmaskedString entity.GetColumnValue(encryptedColumnName) as string;
Show all comments