Execute Liquiloans Transaction Script
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
978 B

const crypto = require('crypto');
function generateHMACSHA256(input, key) {
const hmac = crypto.createHmac('sha256', key);
hmac.update(input, 'utf8'); // Ensure input encoding matches C# (UTF-8)
return hmac.digest('hex');
}
function getHashCode(type) {
const inputString = "||2023-11-22 14:57:38";
const inputString_GetInvestorDashboard = "368907||2023-11-22 14:57:38";
const inputString_GetTransactionById = "5151974||368907||2023-11-22 14:57:38";
const key = "27E6A91CEE689";
const hash = generateHMACSHA256(inputString, key);
const hash_GetInvestorDashboard = generateHMACSHA256(inputString_GetInvestorDashboard, key);
const hash_GetTransactionById = generateHMACSHA256(inputString_GetTransactionById, key);
if (type === 1) {
return hash
}
if (type === 2) {
return hash_GetInvestorDashboard
}
if (type === 3) {
return hash_GetTransactionById
}
}
module.exports = {
getHashCode
}

Powered by TurnKey Linux.