UNPKG

@simplewebauthn/server

Version:
9 lines (8 loc) 277 B
import { getWebCrypto } from './getWebCrypto.js'; export async function importKey(opts) { const WebCrypto = await getWebCrypto(); const { keyData, algorithm } = opts; return WebCrypto.subtle.importKey('jwk', keyData, algorithm, false, [ 'verify', ]); }