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>
Copy link to clipboard
Copied
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.