(bytes: number[])
| 102 | |
| 103 | // Convert a byte array to a hex string |
| 104 | export const bytesToHexString = (bytes: number[]): string => |
| 105 | bytes.reduce( |
| 106 | (str, byte) => `${str}${byte.toString(16).padStart(2, "0")}`, |
| 107 | "" |
| 108 | ); |
| 109 | |
| 110 | // Convert a hex string to a byte array |
| 111 | // Source: https://stackoverflow.com/a/34356351 |
no outgoing calls
no test coverage detected