ჩვენს მოხალისეებს, ჯერ არ შეუმუშავებიათ ამ სტატიის ქართული ვარიანტი. შემოგვიერთდით და დაგვეხმარეთ გადათარგმნაში!
ამასთან, შეგიძლიათ იხილოთ სტატიის English (US) ვერსია.

The CryptoKey interface of the Web Crypto API represents a cryptographic key.

A CryptoKey object can be obtained using SubtleCrypto.generateKey(), SubtleCrypto.deriveKey(), SubtleCrypto.importKey(), or SubtleCrypto.unwrapKey().

Properties

CryptoKey.type

String which may take one of the following values:

CryptoKey.extractable

Boolean indicating whether or not the key may be extracted using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey().

  • true: The key may be extracted.
  • false The key may not be extracted. exportKey() or wrapKey() will throw an exception if used to extract this key.
CryptoKey.algorithm

An object describing the algorithm for which this key can be used and any associated extra parameters.

CryptoKey.usages

An Array of strings, indicating what can be done with the key. Possible values for array elements are:

  • "encrypt": The key may be used to encrypt messages.
  • "decrypt": The key may be used to decrypt messages.
  • "sign": The key may be used to sign messages.
  • "verify": The key may be used to verify signatures.
  • "deriveKey": The key may be used in deriving a new key.
  • "deriveBits": The key may be used in deriving bits.
  • "wrapKey": The key may be used to wrap a key.
  • "unwrapKey": The key may be used to unwrap a key.

Examples

The examples for SubtleCrypto methods often use CryptoKey objects. For example:

Specifications

Specification Status Comment
Web Cryptography API
The definition of 'CryptoKey' in that specification.
Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CryptoKeyChrome Full support 37Edge Full support YesFirefox Full support 34IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 37Chrome Android Full support 37Firefox Android Full support 34Opera Android Full support YesSafari iOS No support NoSamsung Internet Android Full support Yes
typeChrome Full support 37Edge Full support 12Firefox Full support 34IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 37Chrome Android Full support 37Firefox Android Full support 34Opera Android Full support YesSafari iOS No support NoSamsung Internet Android Full support Yes
extractableChrome Full support 37Edge Full support 12Firefox Full support 34IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 37Chrome Android Full support 37Firefox Android Full support 34Opera Android Full support YesSafari iOS No support NoSamsung Internet Android Full support Yes
algorithmChrome Full support 37Edge Full support 12Firefox Full support 34IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 37Chrome Android Full support 37Firefox Android Full support 34Opera Android Full support YesSafari iOS No support NoSamsung Internet Android Full support Yes
usagesChrome Full support 37Edge Full support 12Firefox Full support 34IE No support NoOpera Full support YesSafari No support NoWebView Android Full support 37Chrome Android Full support 37Firefox Android Full support 34Opera Android Full support YesSafari iOS No support NoSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support

See also

დოკუმენტების ჭდეები და წვლილის შემტანები

ამ გვერდის შექმნაში, წვლილის შემტანები: mdnwebdocs-bot, SaschaNaz, wbamberg, chrisdavidmills, fscholz, erikadoyle, teoli
ბოლო განახლების ავტორი: mdnwebdocs-bot,