AesKeyGenParams

AesKeyGenParams dictionary of the Web 加密 API represents the object that should be passed as the algorithm parameter into SubtleCrypto.generateKey() , when generating an AES key: that is, when the algorithm is identified as any of AES-CBC , AES-CTR , AES-GCM ,或 AES-KW .

特性

name
A DOMString . This should be set to AES-CBC , AES-CTR , AES-GCM ,或 AES-KW , depending on the algorithm you want to use.
length

A Number — the length in bits of the key to generate. This must be one of: 128, 192, or 256.

范例

See the examples for SubtleCrypto.generateKey() .

规范

规范 状态 Comment
Web Cryptography API
The definition of 'SubtleCrypto.AesKeyGenParams' in that specification.
Recommendation

浏览器兼容性

Browsers that support any of the the AES-based algorithms for the SubtleCrypto.generateKey() method will support this type.

另请参阅