diff --git a/web/crypto/aes-gcm-crypto-utils.js b/web/crypto/aes-gcm-crypto-utils.js --- a/web/crypto/aes-gcm-crypto-utils.js +++ b/web/crypto/aes-gcm-crypto-utils.js @@ -24,8 +24,19 @@ export const cryptoKeyValidator: TInterface = tShape({ algorithm: t.Object, extractable: t.Boolean, - type: t.String, - usages: t.list(t.String), + type: t.enums.of(['secret', 'public', 'private']), + usages: t.list( + t.enums.of([ + 'encrypt', + 'decrypt', + 'sign', + 'verify', + 'deriveKey', + 'deriveBits', + 'wrapKey', + 'unwrapKey', + ]), + ), }); export const subtleCrypto$JsonWebKeyValidator: TInterface =