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.

SubtleCrypto.exportKey()

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

The SubtleCrypto.exportKey() method returns a Promise of the key encrypted in the requested format. If the key is not extractable, that is if CryptoKey.extractable returns false, the promise fails with an InvalidAccessError exception; it the format is unknown, the promive fails with a NotSupported exception.

Syntax

var result = crypto.exportKey(format, key);

Parameters

Return value

  • result is a Promise that returns the key in the requested format.

Exceptions

The promise is rejected when one of the following exceptions is encountered:

Specifications

Specification Status Comment
Web Cryptography API
The definition of 'SubtleCrypto.exportKey()' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 37 34 (34) Not supported ? Not supported
ECDH ? 41 (41) ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 37 34.0 (34) Not supported ? Not supported
ECDH ? ? 41.0 (41) ? ? ?

See also

文档标签和贡献者

 此页面的贡献者: teoli
 最后编辑者: teoli,