UNPKG

1.64 kBMarkdownView Raw
1# crypto-browserify
2
3A port of node's `crypto` module to the browser.
4
5[![Build Status](https://travis-ci.org/crypto-browserify/crypto-browserify.svg?branch=master)](https://travis-ci.org/crypto-browserify/crypto-browserify)
6[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
7[![Sauce Test Status](https://saucelabs.com/browser-matrix/crypto-browserify.svg)](https://saucelabs.com/u/crypto-browserify)
8
9The goal of this module is to reimplement node's crypto module,
10in pure javascript so that it can run in the browser.
11
12Here is the subset that is currently implemented:
13
14* createHash (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
15* createHmac (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
16* pbkdf2
17* pbkdf2Sync
18* randomBytes
19* pseudoRandomBytes
20* createCipher (aes)
21* createDecipher (aes)
22* createDiffieHellman
23* createSign (rsa, ecdsa)
24* createVerify (rsa, ecdsa)
25* createECDH (secp256k1)
26* publicEncrypt/privateDecrypt (rsa)
27* privateEncrypt/publicDecrypt (rsa)
28
29## todo
30
31these features from node's `crypto` are still unimplemented.
32
33* createCredentials
34
35## contributions
36
37If you are interested in writing a feature, please implement as a new module,
38which will be incorporated into crypto-browserify as a dependency.
39
40All deps must be compatible with node's crypto
41(generate example inputs and outputs with node,
42and save base64 strings inside JSON, so that tests can run in the browser.
43see [sha.js](https://github.com/dominictarr/sha.js)
44
45Crypto is _extra serious_ so please do not hesitate to review the code,
46and post comments if you do.
47
48## License
49
50MIT