EcKeyGenParams
TheEcKeyGenParams dictionary of theWeb Crypto API represents the object that should be passed as thealgorithm parameter intoSubtleCrypto.generateKey(), when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as either ofECDSA orECDH.
In this article
Instance properties
nameA string. This should be set to
ECDSAorECDH, depending on the algorithm you want to use.namedCurveA string representing the name of the elliptic curve to use. This may be any of the following names forNIST-approved curves:
P-256P-384P-521
Examples
See the examples forSubtleCrypto.generateKey().
Specifications
| Specification |
|---|
| Web Cryptography Level 2> # dfn-EcKeyGenParams> |
Browser compatibility
Browsers that support the "ECDH" or "ECDSA" algorithms for theSubtleCrypto.generateKey() method will support this type.