66
Views
5
Comments
Solved
[HMAC-SHA256 Encryption] Add HMAC-SHA256 Encryption in ODC 2024
hmac-sha256-v3-xif
Reactive icon
Forge asset by Mostafa Othman

Good morning,

We have found ourselves in the need to use in ODC the "HMAC-SHA256" encryption type for payment methods, but we have seen that there is currently no extension that provides a method that encrypts plaintext to HMAC-SHA256 (only supported in O11: https://www.outsystems.com/forge/component-overview/11713/hmac-sha256-encryption-o11).

We would like to know if there is any expectation to be able to integrate an extension with this encryption method in the current version of ODC.

Thank you very much!


2021-10-09 07-57-44
Stefan Weber
 
MVP
Solution

Hi, I haven't yet tried it out myself, but ODC now has some integrated cryptographic methods. The one you are looking for is probably the ComputeMAC action in the Security Source.

ComputMAC is based on the .NET HMAC.Create method. The default algorithm is HMACSHA512. The other options for the algorithm input parameter can be found in the above link (HMACSHA256 in your case).
If you are trying it out I would appreciate if you could share your results here.
Thank you,

Stefan

2022-11-24 12-49-49
franjzamora

exactly you can use this  in my case i used this expression
ToLower(BinaryDataToHex(ComputeMAC(body, secret,Algorithm:"HMACSHA256")))

2020-11-25 10-45-32
Mostafa Othman
Champion

Hello Amin,

This version of component for O11 only.

I will try action that Stefan mentioned and check it will give same results if it is not working I will try to create new version for ODC.

UserImage.jpg
Laia Serra

Hello Mostafa,

Could you check if the solution that proposed @Stefan Weber  worked in ODC? We tried ComputeMAC in ODC but we don't have the hoped result. 

Could it be possible you create new version for ODC? 

Thank you.

2020-11-25 10-45-32
Mostafa Othman
Champion

Hi Laia,

I am sorry for late reply.

I am still didn't try to publish this component to ODC but I will start working on this and we update you soon.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.