You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The typescript definitions for import and export AES key specify it should be one of 'pkcs8' | 'spki' | 'raw'
However, it looks like pkcs8 and spki are not valid and it should be 'raw' or 'jwk'
To Reproduce
const x = exportKey( myKey, 'pkcs8'); < doesn't work, throwing wrong type of key error
const x = exportKey( myKey, 'jwk'); < works great
More info
Line 125 of web-crypto.d.ts (& line 117)
declare const exportKey: (key: CryptoKey, type?: 'pkcs8' | 'spki' | 'raw') => Promise;
The text was updated successfully, but these errors were encountered:
Describe the bug
The typescript definitions for import and export AES key specify it should be one of 'pkcs8' | 'spki' | 'raw'
However, it looks like pkcs8 and spki are not valid and it should be 'raw' or 'jwk'
To Reproduce
const x = exportKey( myKey, 'pkcs8'); < doesn't work, throwing wrong type of key error
const x = exportKey( myKey, 'jwk'); < works great
More info
Line 125 of web-crypto.d.ts (& line 117)
declare const exportKey: (key: CryptoKey, type?: 'pkcs8' | 'spki' | 'raw') => Promise;
The text was updated successfully, but these errors were encountered: