var hex = "354d413043b4b440e1510b00";
var not_hex = Buffer.from(hex, 'hex').toString('utf8');
var hex_again = Buffer.from(not_hex, 'utf8').toString('hex');
var hex = "354d413043b4b440e1510b00";
console.log(hex); // 354d413043b4b440e1510b00
var not_hex = (Buffer.from(hex, "hex").toString("binary"))
console.log(not_hex); // 5MA0C´´@áQ♂
var hex_again = Buffer.from(not_hex, 'binary').toString("hex");
console.log(hex_again); // 354d413043b4b440e1510b00
console.log(hex === hex_again); // true
console.log((Buffer.from(hex, "hex").toString("utf-8")));
5MA0C��@�Q
[...new TextEncoder().encode("5MA0C��@�Q")].map(n => n.toString(16)).join("")
===
"354d413043efbfbdefbfbd40efbfbd51"
// true
var hex = "354d413043b4b440e1510b00";
var not_hex = Buffer.from(hex, 'hex');
var hex_again = Buffer.from(not_hex, 'utf8').toString('hex');
console.log(hex, not_hex)
console.log(hex_again)
// выводит
// 354d413043b4b440e1510b00 <Buffer 35 4d 41 30 43 b4 b4 40 e1 51 0b 00>
// 354d413043b4b440e1510b00