(hex: string)
| 84 | * Encodes bytes as a hex string to Uint8Array |
| 85 | */ |
| 86 | export const encodeHexBytes = (hex: string): Uint8Array => { |
| 87 | const bytes = new Uint8Array(hex.length / 2) |
| 88 | for (let i = 0; i < hex.length; i += 2) { |
| 89 | bytes[i / 2] = parseInt(hex.slice(i, i + 2), 16) |
| 90 | } |
| 91 | return bytes |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * Concatenates multiple Uint8Arrays |
no test coverage detected