Web 加密 API is an interface allowing a script to use cryptographic primitives in order to build systems using cryptography.
警告： The Web Crypto API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.
Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.
Errors in security system design and implementation can make the security of the system completely ineffective.
If you're not sure you know what you are doing, you probably shouldn't be using this API.
Some browsers implemented an interface called
without having it well defined or being cryptographically sound. In order to avoid confusion, methods and properties of this interface have been removed from browsers implementing the Web Crypto API, and all Web Crypto API methods are available on a new interface:
property gives access to an object implementing it.
|Web Cryptography API||Recommendation||初始定义|
||Chrome 11||Edge 12||Firefox 26||IE 11||Opera 15||Safari 6.1||WebView Android Yes||Chrome Android 18||Firefox Android 26||Opera Android 14||Safari iOS 6.1||Samsung Internet Android 1.0|
||Chrome 11||Edge 12||Firefox 26||IE 11||Opera 15||Safari 6.1||WebView Android ≤37||Chrome Android 18||Firefox Android 26||Opera Android 14||Safari iOS 6.1||Samsung Internet Android 1.0|
||Chrome 37||Edge 12||
||IE 部分支持 11||Opera 24||
||WebView Android 37||Chrome Android 37||
||Opera Android 24||
||Samsung Internet Android 3.0|