Dears I am getting this error when trying to use CryptoJS for string, I have used Run JavaScript on Microsoft Power Automat Desktop
Microsoft JScript runtime error: 'CryptoJS' is undefined.
// Create a new Date object to represent the current UTC date
var currentDate = new Date();
// Get UTC year, month, and date components
var year = currentDate.getUTCFullYear().toString();
var month = (currentDate.getUTCMonth()+1).toString();
// Months are zero-indexed, so add 1
var day = currentDate.getUTCDate().toString();
// Combine components to create the formatted UTC date
var formattedUTCDate = year + month + day;
var pass = "MNA8016fa5558"+ formattedUTCDate +"0957b65ffr534w2f19f1";
var enc_pass = CryptoJS.SHA1(pass).toString(CryptoJS.enc.Hex);
WScript.Echo(enc_pass);
Regards

Report
All responses (
Answers (