Describe the feature
For simple serialization / deserilization (like e.g. for dates) the serializer API is enough. For more complex serialization like e.g. serializing crypto public keys, the entire webcrypto api is async.
An example for serializing a public key to a jwk (json web key):
const keyPair = await crypto.subtle.generateKey(
{
name: 'RSA-OAEP',
modulusLength: 4096,
publicExponent: new Uint8Array([1, 0, 1]),
hash: 'SHA-256',
},
true,
['encrypt', 'decrypt'],
)
const serialized = await crypto.subtle.exportKey('jwk', keyPair.publicKey)
This can't be done with the current API. Willing to make a PR!
Additional information
Describe the feature
For simple serialization / deserilization (like e.g. for dates) the serializer API is enough. For more complex serialization like e.g. serializing crypto public keys, the entire
webcryptoapi is async.An example for serializing a public key to a
jwk(json web key):This can't be done with the current API. Willing to make a PR!
Additional information