(data: Uint8Array)
| 25 | const textToData = (text: string) => new TextEncoder().encode(text); |
| 26 | |
| 27 | export const dataToText = (data: Uint8Array) => new TextDecoder().decode(data); |
| 28 | |
| 29 | export const generateKey = async (key: string): Promise<CryptoKey> => |
| 30 | await crypto.subtle.importKey('raw', textToData(key), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign', 'verify']); |
no outgoing calls
no test coverage detected