Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. CryptoKeyPair

CryptoKeyPair

TheCryptoKeyPair dictionary of theWeb Crypto API represents a key pair for an asymmetric cryptography algorithm, also known as a public-key algorithm.

ACryptoKeyPair object can be obtained usingSubtleCrypto.generateKey(), when the selected algorithm is one of the asymmetric algorithms: RSASSA-PKCS1-v1_5, RSA-PSS, RSA-OAEP, ECDSA, or ECDH.

It contains two properties, which are bothCryptoKey objects: aprivateKey property containing the private key and apublicKey property containing the public key.

Instance properties

CryptoKeyPair.privateKey

ACryptoKey object representing the private key. For encryption and decryption algorithms, this key is used to decrypt. For signing and verification algorithms it is used to sign.

CryptoKeyPair.publicKey

ACryptoKey object representing the public key. For encryption and decryption algorithms, this key is used to encrypt. For signing and verification algorithms it is used to verify signatures.

Examples

The examples forSubtleCrypto methods often useCryptoKeyPair objects. For example:

Specifications

Specification
Web Cryptography Level 2
# keypair

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp