Add `crypto.key` module
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
The current `worktop/crypto` module has `keyload` and `keygen` methods, but they're really not all that helpful. I end up dropping into `crypto.subtle.importKey` (and others) directly quite often, which is a good signal that something should be done here.
Additionally, the native TS definitions for `importKey` et all are pretty useless... With custom methods, I should be able to accurately offer _strict overloads_ so that you can only have/define valid combinations. For example, for [`importKey`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#supported_formats) has its own restrictions and `generateKey` has different input requirements based on format. Both of these can offer much better types - and possibly a tiny abstraction.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the worktop/crypto module and compare its keyload and keygen helpers with crypto.subtle.importKey and generateKey, using the linked MDN supported-format restrictions as the reference. Define the intended strict overload coverage and abstraction boundary; done means the requested key operations expose valid combinations through TypeScript types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100