j4J
Denoβ€’4y agoβ€’
3 replies
j4

Getting error `Unrecognized algorithm name` on `crypto.subtle.importKey()`

I can't figure this one out. I've done some searching and found a list of supported algos at https://deno.land/std@0.167.0/crypto/mod.ts

See anything I'm doing wrong? I tried it without the hash as well. Here's a snippet:

/* supabase edge function */
import { crypto } from 'https://deno.land/std@0.167.0/crypto/mod.ts'

const cryptokey = await crypto.subtle.importKey('spki', encoded_plain_key, 'SHA-512', false, ['sign'])
Was this page helpful?