cryptoKey.usages
- 类型:<string[]>
一个字符串数组,用于标识该密钥可以使用的操作。
🌐 An array of strings identifying the operations for which the key may be used.
可能的用法是:
🌐 The possible usages are:
'encrypt'- 启用使用subtle.encrypt()的密钥'decrypt'- 启用使用subtle.decrypt()的密钥'sign'- 启用使用subtle.sign()的密钥'verify'- 启用使用subtle.verify()的密钥'deriveKey'- 启用使用subtle.deriveKey()的密钥'deriveBits'- 启用使用subtle.deriveBits()的密钥'encapsulateBits'- 启用使用subtle.encapsulateBits()的密钥'decapsulateBits'- 启用使用subtle.decapsulateBits()的密钥'encapsulateKey'- 启用使用subtle.encapsulateKey()的密钥'decapsulateKey'- 启用使用subtle.decapsulateKey()的密钥'wrapKey'- 启用使用subtle.wrapKey()的密钥'unwrapKey'- 启用使用subtle.unwrapKey()的密钥
有效的密钥用途取决于密钥算法(由 cryptokey.algorithm.name 标识)。有关每种密钥算法支持的操作,请参见 加密操作接口。
🌐 Valid key usages depend on the key algorithm (identified by
cryptokey.algorithm.name). See Crypto operation APIs for the operations
supported by each key algorithm.