web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Hash or protect sensitive information in a form

(0) ShareShare
ReportReport
Posted on by 14,855

Dear 

I have sensitive data like the credit card number which I want to protect from regular users, and i want only one user or group of users to be able to see this information. 

how do you suggest i do it ? is there anyway to ********** hash a number in AX

what is the best way to go at it ?

Regards

*This post is locked for comments

I have the same question (0)
  • Rodolfo Recalde Profile Picture
    on at

    Hi Patrick,

    Maybe you can use Type Field Container  with  ExtendedDataType CryptoBlob in your table.

    see the example in the  SysEmailParameters form. method edit setPassword (AX 2012 R3).

     

    You can return the encrypted value through this call, according to his user group rule:

    cryptoblob2str(WinapiServer::cryptUnprotectData([YourTable].[YourFieldContainerCryptoBlobPassword]));

     

    Be very careful with credit card number and other confidential information. (usually is not a good idea to store the number of credit card in your system....I have witnessed a lot of trouble with that).

    http://stackoverflow.com/questions/3002189/best-practices-to-store-creditcard-information-into-database

    http://stackoverflow.com/questions/3328922/saving-credit-card-information-in-mysql-database

    http://security.stackexchange.com/questions/18677/convince-the-company-not-to-store-credit-card-numbers-in-our-webapp

    See also this example:

    https://community.dynamics.com/ax/b/yetanotherdynamicsaxblog/archive/2013/10/18/simple-encryption-and-decryption-in-ax2012

    I Hope this Helps!

    Regards,

    Rodolfo Recalde.

  • Suggested answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Have a look at next discussion

  • SKO Profile Picture
    401 on at

    Hi Rudolfo,

    I created a simple table with username and password fields using string for username and container with edt cryptoblob. I have used the same code as sysemailparameters form. when i entered the data and closed the form it gives the below error.

    SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]String or binary data would be truncated.

    not sure why this is coming as my data goes into a container.

    Please help me with this.

    Thanks

  • Rodolfo Recalde Profile Picture
    on at

    This kind of error occurs when the size of the string/key it's bigger than the size of the field. Verify the EDT or StringSize of the field.

    In your case, try use the EDT CrytoBlob - Type container.

    I Hope this Helps!

    Regards,

    Rodolfo Recalde.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans