我可以使用下面的代码将Unit8Array转换为hex
var bkh = {
publicKey: new Uint8Array([91, 221, 234, 40, 144, 246, 91, 187, 154, 76,
60, 178, 204, 81, 35, 195, 254, 114, 246, 88, 90, 170, 68, 97, 199,
170, 72, 36, 107, 66, 206, 9]
),
secretKey: new Uint8Array([64, 68, 196, 103, 210, 179, 166, 40, 187,
150, 167, 233, 144, 206, 64, 26, 77, 133, 70, 238, 232, 227, 133,
83, 149, 202, 213, 41, 152, 243, 237, 41]
)
}
let hex = Buffer.from(bkh.publicKey).toString('hex');
console.log('master key',hex)
我怎么能把这个
hex
值返回到节点中的Unit8Array