timestamp и device_id всегда меняются, когда я запрашиваю функцию для создания подписи, но хэш подписи все еще
ea6b458e9a840b7f93236244bf1ea7cb564a8f08
этот хеш генерирует код
let array = [login_type, device_id, timestamp];
let hash = crypto.createHmac('sha1', secret_key).update(implode(array, "|")).digest('hex');
function timeMil(){
var date = new Date();
var timeMil = date.getTime();
return timeMil;
}
const device_id = "2752707c1c745ff8";
const secret_key = "9LXAVCxcITaABNK48pAVgc4muuTNJ4enIKS5YzKyGZ";
const timestamp = timeMil();
let array = [login_type, device_id, timestamp];
let hash = crypto.createHmac('sha1', secret_key).update(implode(array, "|")).digest('hex');
console.info(hash);
Genarated hash_hmac alway is ea6b458e9a840b7f93236244bf1ea7cb564a8f08



![Безумие обратных вызовов в javascript [JS]](https://i.imgur.com/WsjO6zJb.png)


В JavaScript нет функции «взорвать»; его эквивалент использует join в массиве:
const crypto = require('crypto');
function timeMil(){
return new Date().getTime();
}
const login_type = 'test';
const device_id = "2752707c1c745ff8";
const secret_key = "9LXAVCxcITaABNK48pAVgc4muuTNJ4enIKS5YzKyGZ";
const timestamp = timeMil();
let array = [login_type, device_id, timestamp];
let hash = crypto.createHmac('sha1', secret_key).update(array.join("|")).digest('hex');
console.info(hash);
Спасибо. Решено