Convert Uint8Array to ArrayBuffer (needed for SubtleCrypto)
(arr: Uint8Array)
| 118 | |
| 119 | /** Convert Uint8Array to ArrayBuffer (needed for SubtleCrypto) */ |
| 120 | function toArrayBuffer(arr: Uint8Array): ArrayBuffer { |
| 121 | return arr.buffer.slice(arr.byteOffset, arr.byteOffset + arr.byteLength) as ArrayBuffer; |
| 122 | } |
| 123 | |
| 124 | let aesKeyCache = new WeakMap<Uint8Array, CryptoKey>(); |
| 125 |
no outgoing calls
no test coverage detected