• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Could you please help on create Screct using cryto.hmac method in coldfusion

New Here ,
Nov 11, 2020 Nov 11, 2020

Copy link to clipboard

Copied

Please find below snippet , we have to convert to Coldfusion tags ,any one help me.

 

<script type="text/javascript">
var epochTime = "1605070736";
var Digest = computeDigest();
function computeDigest()
{
var hmac = Crypto.HMAC(Crypto.SHA256, epochTime, "1308302020102915214099263166", { asBytes: true });
var base64String = Crypto.util.bytesToBase64(Crypto.HMAC(Crypto.SHA256, epochTime, "AKI1308302020102915214099263166", { asBytes: true }));
return base64String;
}
</script>

Views

84

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

LATEST

ColdFusion code runs on the server. Your code is Javascript. Hence it is meant to run on the browser.

 

If you wish to run Crypto on ColdFusion then you should:

 

1) Import the Crypto Java library or classes into ColdFusion;

2) Also import any other third-party libraries that Crypto depends on.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation