(key: string)
| 44 | } |
| 45 | |
| 46 | async function getKey(key: string) { |
| 47 | return await crypto.subtle.importKey('raw', encodeBase64(key), { name: 'AES-CBC' }, false, ['encrypt', 'decrypt']); |
| 48 | } |
| 49 | |
| 50 | function decodeBase64(encoded: Uint8Array) { |
| 51 | const byteChars = Array.from(encoded, (byte) => String.fromCodePoint(byte)); |
no test coverage detected