subtle.generateKey(algorithm, extractable, keyUsages)
algorithm: <AlgorithmIdentifier> | <RsaHashedKeyGenParams> | <EcKeyGenParams> | <HmacKeyGenParams> | <AesKeyGenParams>
extractable: <boolean>keyUsages: <string[]> 参见 主要用途。- 返回:包含 <CryptoKey> | <CryptoKeyPair> 的 <Promise>
使用 algorithm 中提供的方法和参数,subtle.generateKey() 尝试生成新的密钥材料。根据使用的方法,该方法可能生成单个 <CryptoKey> 或 <CryptoKeyPair>。
🌐 Using the method and parameters provided in algorithm, subtle.generateKey()
attempts to generate new keying material. Depending the method used, the method
may generate either a single <CryptoKey> or a <CryptoKeyPair>.
支持的 <CryptoKeyPair>(公钥和私钥)生成算法包括:
🌐 The <CryptoKeyPair> (public and private key) generating algorithms supported include:
支持的 <CryptoKey>(密钥)生成算法包括:
🌐 The <CryptoKey> (secret key) generating algorithms supported include:
'HMAC''AES-CTR''AES-CBC''AES-GCM''AES-KW'