将 ArrayBuffer 转换为十六进制字符串
const buffer = new Uint8Array([1, 2, 3]).buffer;const hex = bufferToHex(buffer);console.log(hex); // 可能输出 "010203" Copy
const buffer = new Uint8Array([1, 2, 3]).buffer;const hex = bufferToHex(buffer);console.log(hex); // 可能输出 "010203"
需要转换的 ArrayBuffer
转换后的十六进制字符串
将 ArrayBuffer 转换为十六进制字符串
Example