cryptoKey.usages
-
类型:<string[]>
¥Type: <string[]>
标识可能使用键的操作的字符串数组。
¥An array of strings identifying the operations for which the key may be used.
可能的用法是:
¥The possible usages are:
-
'encrypt'
- 密钥可用于加密数据。¥
'encrypt'
- The key may be used to encrypt data. -
'decrypt'
- 密钥可用于解密数据。¥
'decrypt'
- The key may be used to decrypt data. -
'sign'
- 该密钥可用于生成数字签名。¥
'sign'
- The key may be used to generate digital signatures. -
'verify'
- 密钥可用于验证数字签名。¥
'verify'
- The key may be used to verify digital signatures. -
'deriveKey'
- 该密钥可用于导出新密钥。¥
'deriveKey'
- The key may be used to derive a new key. -
'deriveBits'
- 密钥可用于导出位。¥
'deriveBits'
- The key may be used to derive bits. -
'wrapKey'
- 该密钥可用于封装另一个密钥。¥
'wrapKey'
- The key may be used to wrap another key. -
'unwrapKey'
- 该密钥可用于解包另一个密钥。¥
'unwrapKey'
- The key may be used to unwrap another key.
有效的密钥用法取决于密钥算法(由 cryptokey.algorithm.name
标识)。
¥Valid key usages depend on the key algorithm (identified by
cryptokey.algorithm.name
).
支持的密钥算法 | 'encrypt' | 'decrypt' | 'sign' | 'verify' | 'deriveKey' | 'deriveBits' | 'wrapKey' | 'unwrapKey' |
---|---|---|---|---|---|---|---|---|
'AES-CBC' | ✔ | ✔ | ✔ | ✔ | ||||
'AES-CTR' | ✔ | ✔ | ✔ | ✔ | ||||
'AES-GCM' | ✔ | ✔ | ✔ | ✔ | ||||
'AES-KW' | ✔ | ✔ | ||||||
'ECDH' | ✔ | ✔ | ||||||
'X25519' | ✔ | ✔ | ||||||
'X448' 1 | ✔ | ✔ | ||||||
'ECDSA' | ✔ | ✔ | ||||||
'Ed25519' | ✔ | ✔ | ||||||
'Ed448' 1 | ✔ | ✔ | ||||||
'HDKF' | ✔ | ✔ | ||||||
'HMAC' | ✔ | ✔ | ||||||
'PBKDF2' | ✔ | ✔ | ||||||
'RSA-OAEP' | ✔ | ✔ | ✔ | ✔ | ||||
'RSA-PSS' | ✔ | ✔ | ||||||
'RSASSA-PKCS1-v1_5' | ✔ | ✔ |