1 | {"version":3,"file":"common.cjs","sources":["../crypto/common.js"],"sourcesContent":["import * as webcrypto from 'lib0/webcrypto'\n\n/**\n * @param {CryptoKey} key\n */\nexport const exportKeyJwk = async key => {\n const jwk = await webcrypto.subtle.exportKey('jwk', key)\n jwk.key_ops = key.usages\n return jwk\n}\n\n/**\n * Only suited for exporting public keys.\n *\n * @param {CryptoKey} key\n * @return {Promise<Uint8Array>}\n */\nexport const exportKeyRaw = key =>\n webcrypto.subtle.exportKey('raw', key).then(key => new Uint8Array(key))\n"],"names":["webcrypto"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACY,MAAC,YAAY,GAAG,MAAM,GAAG,IAAI;AACzC,EAAE,MAAM,GAAG,GAAG,MAAMA,oBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAC;AAC1D,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAM;AAC1B,EAAE,OAAO,GAAG;AACZ,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,YAAY,GAAG,GAAG;AAC/B,EAAEA,oBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,UAAU,CAAC,GAAG,CAAC;;;;;"} |