Home

Awesome

webcrypto-shim.js

Web Cryptography API shim for legacy browsers.

Quick start with Bower

Install the package

$ bower install webcrypto-shim

and link scripts into your html code

<script src="bower_components/promiz/promiz.js"></script>
<script src="bower_components/webcrypto-shim/webcrypto-shim.js"></script>

Now you can use webcrypto api through the window.crypto and window.crypto.subtle objects.

Note that IE11 lacks support of Promise-s and requires promiz.js to work properly. You can replace promiz.js with any Promise/A+-compatible implementation.

Supported browsers

The library is targeted to fix these browsers having prefixed and buggy webcrypto api implementations:

These browsers have unprefixed and conforming webcrypto api implementations, so no need in shim:

Crossbrowser support of algorithms & operations

Known limitations

deriveKey, deriveBits are not supported under IE11 and Safari since there is no implementation of any algorithm providing key derivation.

Under IE11 exception is thrown in case of empty input data since IE11 silently discards empty data and leaves returned Promise object never resolved nor rejected.

Other browsers support

See https://vibornoff.github.io/webcrypto-examples/index.html

Sponsored by

BrowserStack — automated & manual crossbrowser testing solution.