Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 726053 of CryptoKey

  • Revision slug: Web/API/CryptoKey
  • Revision title: CryptoKey
  • Revision id: 726053
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment More info.

Revision Content

{{APIRef}}{{SeeCompatTable}}

The CryptoKey interface represents a cryptographic {{glossary("key")}} derived from a specific key algorithm.

Properties

This interface doesn't inherit any property.

{{domxref("CryptoKey.type")}}
Returns an enumerated value representing the type of the key, a secret key (for symmetric algorithm), a public or a private key (for an asymmetric algorithm)
{{domxref("CryptoKey.extractable")}}
Returns a {{jsxref("Boolean")}} indicating if the raw information may be exported to the application or not.
{{domxref("CryptoKey.algorithm")}}
Returns an opaque object representing a particular cipher the key has to be used with.
{{domxref("CryptoKey.usages")}}
Returns an array of enumerated values indicating which usage of the key are permitted.

Methods

This interface neither inherits, nor implements, any method.

Specifications

Specification Status Comment
{{ SpecName('Web Crypto API', '#dfn-CryptoKey', 'CryptoKey') }} {{ Spec2('Web Crypto API') }} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatChrome(37) }} {{ CompatGeckoDesktop(34) }} {{ CompatNo() }} {{ CompatUnknown() }} {{ CompatNo }}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 37 {{ CompatChrome(37) }} {{ CompatGeckoMobile(34) }} {{ CompatNo }} {{ CompatUnknown() }} {{ CompatNo }}

See also

  • {{domxref("Crypto")}} and {{domxref("Crypto.subtle")}}.

Revision Source

<p>{{APIRef}}{{SeeCompatTable}}</p>

<p>The <strong><code>CryptoKey</code></strong> interface represents a cryptographic {{glossary("key")}} derived from a specific key algorithm.</p>

<h2 id="Properties">Properties</h2>

<p><em>This interface doesn't inherit any property.</em></p>

<dl>
 <dt>{{domxref("CryptoKey.type")}}</dt>
 <dd>Returns an enumerated value representing the type of the key, a secret key (for symmetric algorithm), a public or a private key (for an asymmetric algorithm)</dd>
 <dt>{{domxref("CryptoKey.extractable")}}</dt>
 <dd>Returns a {{jsxref("Boolean")}} indicating if the raw information may be exported to the application or not.</dd>
 <dt>{{domxref("CryptoKey.algorithm")}}</dt>
 <dd>Returns an opaque object representing a particular cipher the key has to be used with.</dd>
 <dt>{{domxref("CryptoKey.usages")}}</dt>
 <dd>Returns an array of enumerated values indicating which usage of the key are permitted.</dd>
</dl>

<h2 id="Methods">Methods</h2>

<p><em>This interface neither inherits, nor implements, any method.</em></p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{ SpecName('Web Crypto API', '#dfn-CryptoKey', 'CryptoKey') }}</td>
   <td>{{ Spec2('Web Crypto API') }}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{ CompatibilityTable() }}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{ CompatChrome(37) }}</td>
   <td>{{ CompatGeckoDesktop(34) }}</td>
   <td>{{ CompatNo() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatNo }}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>37</td>
   <td>{{ CompatChrome(37) }}</td>
   <td>{{ CompatGeckoMobile(34) }}</td>
   <td>{{ CompatNo }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatNo }}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{domxref("Crypto")}} and {{domxref("Crypto.subtle")}}.</li>
</ul>
Revert to this revision