MCPcopy Create free account
hub / github.com/stackblitz/bolt.new / getKey

Function getKey

app/lib/crypto.ts:46–48  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

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

Callers 2

encryptFunction · 0.85
decryptFunction · 0.85

Calls 1

encodeBase64Function · 0.85

Tested by

no test coverage detected