Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to Hash or protect sensitive information in a form

Posted on by 14,849

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

  • RE: How to Hash or protect sensitive information in a form

    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.

  • SKO Profile Picture
    SKO 297 on at
    RE: How to Hash or protect sensitive information in a form

    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

  • Suggested answer
    Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: How to Hash or protect sensitive information in a form

    Have a look at next discussion

  • RE: How to Hash or protect sensitive information in a form

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans