The Wayback Machine - https://web.archive.org/web/20150928005047/https://developer.mozilla.org/ja/docs/Web/API/SubtleCrypto

Join MDN and developers like you at Mozilla's View Source conference, November 2-4 in Portland, Oregon. Learn more at https://viewsourceconf.org/.

SubtleCrypto

by 7 contributors:

This article is in need of a technical review.

この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

The SubtleCrypto interface represents a set of cryptographic primitives. It is available via the Crypto.subtle properties available in a window context (via Window.crypto).

Properties

This interface neither inherits, nor implements, any property.

Methods

This interface doesn't inherit any method.

SubtleCrypto.encrypt()
Returns a Promise of the encrypted data corresponding to the clear text, algorithm and key given as parameters.
SubtleCrypto.decrypt()
Returns a Promise of the clear data corresponding to the encrypted text, algorithm and key given as parameters.
SubtleCrypto.sign()
Returns a Promise of the signature corresponding to the text, algorithm and key given as parameters.
SubtleCrypto.verify()
Returns a Promise of a Boolean value indicating if the signature given as parameter matches the text, algorithm and key also given as parameters.
SubtleCrypto.digest()
Returns a Promise of a digest generated from the algorithm and text given as parameters.
SubtleCrypto.generateKey()
Returns a Promise of a newly generated CryptoKey, for symmetrical algorithms, or a CryptoKeyPair, containing two newly generated keys, for asymmetrical algorithm, that matches the algorithm, the usages and the extractability given as parameters.
SubtleCrypto.deriveKey()
Returns a Promise of a newly generated CryptoKey derivated from a master key and a specific algorithm given as parameters.
SubtleCrypto.deriveBits()
Returns a Promise of a newly generated buffer of pseudo-random bits derivated from a master key and a specific algorithm given as parameters.
SubtleCrypto.importKey()
Returns a Promise of a CryptoKey corresponding to the format, the algorithm, the raw key data, the usages and the extractability given as parameters.
SubtleCrypto.exportKey()
Returns a Promise of a buffer containing the key in the format requested.
SubtleCrypto.wrapKey()
Returns a Promise of a wrapped symmetric key for usage (transfer, storage) in unsecure environments. The wrapped buffer returned is in the format given in parameters, and contained the key wrapped by the give wrapping key with the given algorithm.
SubtleCrypto.unwrapKey()
Returns a Promise of a CryptoKey corresponding to the wrapped key given in parameter.

Specifications

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

Browser compatibility

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

See also

ドキュメントのタグと貢献者

Contributors to this page: chrisdavidmills, pstricker, teoli, flaviut, mkato, kscarfone, looch
最終更新者: chrisdavidmills,