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

51

Likes

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
Adobe Community Professional ,
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.

Likes

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