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

  • Rodolfo Recalde Profile Picture
    on at
    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
    340 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
    46,614 User Group Leader on at
    RE: How to Hash or protect sensitive information in a form

    Have a look at next discussion

  • Rodolfo Recalde Profile Picture
    on at
    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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Kempeth Profile Picture

Kempeth 4

#1
Andy Adamak Profile Picture

Andy Adamak 4

#1
Community Member Profile Picture

Community Member 4

Featured topics

Product updates

Dynamics 365 release plans