ArrayBuffer转16进度字符串

`

  

buf2hex = (buffer) => {    // buffer is an ArrayBuffer
    console.log(buffer)
    return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join('');
}

`

posted @ 2020-09-09 09:24  吃鸡小能手  阅读(1850)  评论(0编辑  收藏  举报