You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
The text was updated successfully, but these errors were encountered:
The current
worktop/crypto
module haskeyload
andkeygen
methods, but they're really not all that helpful. I end up dropping intocrypto.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, forimportKey
has its own restrictions andgenerateKey
has different input requirements based on format. Both of these can offer much better types - and possibly a tiny abstraction.The text was updated successfully, but these errors were encountered: