Skip to content

Add types to key wrapping and unwrapping #29342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

JamesJansson
Copy link

Currently, it is impossible to wrap and unwrap keys in Typescript as the algorithm parameters are not possible under the current type definitions. I have used the examples of wrap and unwrap this file as reference: https://github.com/diafygi/webcrypto-examples

This is the mapping between the algorithms and types, as I see them:
RSA-OAEP: RsaHashedImportParams
AES-CTR: AesCtrParams
AES-CBC: AesCbcParams
AES-GCM: AesGcmParams
AES-CFB: (can use AesCbcParams)
AES-KW: (can use Algorithm)

Fixes #

Currently, it is impossible to wrap and unwrap keys in Typescript as the algorithm parameters are not possible under the current type definitions. I have used the examples of wrap and unwrap this file as reference: https://github.com/diafygi/webcrypto-examples

This is the mapping between the algorithms and types, as I see them:
RSA-OAEP: RsaHashedImportParams
AES-CTR: AesCtrParams 
AES-CBC: AesCbcParams
AES-GCM: AesGcmParams
AES-CFB: (can use AesCbcParams)
AES-KW: (can use Algorithm)
@typescript-bot
Copy link
Collaborator

It looks like you've sent a pull request to update some generated declaration files related to the DOM. These files aren't meant to be edited by hand, as they are synchronized with files in the TSJS-lib-generator repository. You can read more here. For house-keeping purposes, this pull request will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants