(arrayBuffer)
| 9 | } |
| 10 | |
| 11 | function arrayBufferToHex(arrayBuffer) { |
| 12 | const byteArray = new Uint8Array(arrayBuffer); |
| 13 | let str = ""; |
| 14 | for (let i = 0; i < byteArray.byteLength; i += 1) { |
| 15 | str += byteArray[i].toString(16).padStart(2, "0"); |
| 16 | } |
| 17 | return str; |
| 18 | } |
| 19 | |
| 20 | module.exports = { |
| 21 | stringToArrayBuffer, |
no outgoing calls
no test coverage detected