workers-types icon indicating copy to clipboard operation
workers-types copied to clipboard

WebCrypto interfaces need to be cleaned up

Open vlovich opened this issue 4 years ago • 1 comments

Opening this to track this work but the fixes should live in the internal Cloudflare runtime code (either as code changes or overrides). The various operations are too generic. For example, we should export a AesGcmParams that has a fixed name of AES-GCM whereas currently we have a catch-all SubtleCryptoEncryptAlgorithm that is the union of all possible values. Same for things like SubtleCryptoImportKeyAlgorithm, SubtleCryptoHashAlgorithm which don't technically exist. As a nicety, we should hard-code the set of legal values for params that only have a valid set.

vlovich avatar Nov 02 '21 16:11 vlovich

cc @harrishancock for visibility.

vlovich avatar Nov 02 '21 16:11 vlovich

Hey! 👋 We'll get this fixed in the next major version of workers-types using the new type generation system. 👍

mrbbot avatar Oct 21 '22 13:10 mrbbot