* Convert string to Uint8Array
(str: string)
| 42 | * Convert string to Uint8Array |
| 43 | */ |
| 44 | function stringToArrayBuffer(str: string): Uint8Array { |
| 45 | const encoder = new TextEncoder(); |
| 46 | return encoder.encode(str); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Convert BufferSource to string |
no outgoing calls
no test coverage detected