|
1 | 1 | # crypto-browserify
|
2 | 2 |
|
3 |
| -A (partial) port of `crypto` to the browser. |
4 |
| - |
| 3 | +A (partial) port of node's `crypto` module to the browser. |
5 | 4 |
|
6 | 5 | [](https://travis-ci.org/dominictarr/crypto-browserify)
|
7 | 6 |
|
8 | 7 | [](http://ci.testling.com/dominictarr/crypto-browserify)
|
9 | 8 |
|
| 9 | +The goal of this module is to reimplement node's crypto module, |
| 10 | +in pure javascript so that it can run in the browser. |
| 11 | + |
| 12 | +Here is the subset that is currently implemented: |
| 13 | + |
| 14 | +* createHash (sha1, sha256, md5) |
| 15 | +* createHmac (sha1, sha256, md5) |
| 16 | +* randomBytes |
| 17 | + |
| 18 | +## TODO |
| 19 | + |
| 20 | +The highest priority unimplemented features are |
| 21 | + |
| 22 | +* createDiffieHelman |
| 23 | +* createCipher (aes) |
| 24 | +* createDecipher (aes) |
| 25 | +* createSign (rsa) |
| 26 | +* createVerify (rsa) |
| 27 | + |
| 28 | +## contributions |
| 29 | + |
| 30 | +If you are interested in writing a feature, please create implement as a new module, |
| 31 | +which will be incorperated into crypto-browserify as a dependency. |
| 32 | + |
| 33 | +All deps must be compatible with node's crypto |
| 34 | +(generate example inputs and outputs with node, |
| 35 | +and save base64 strings inside JSON, so that tests can run in the browser. |
| 36 | +see [sha.js](https://github.com/dominictarr/sha.js) |
10 | 37 |
|
11 |
| -Basically, I found some crypto implemented in JS lieing on the internet somewhere |
12 |
| -and wrapped it in the part of the `crypto` api that I am currently using. |
| 38 | +Crypto is _extra serious_ so please do not hesitate to review the code, |
| 39 | +and post comments if you do. |
13 | 40 |
|
14 |
| -In a way that will be compatible with [browserify](https://github.com/substack/node-browserify/). |
| 41 | +## License |
15 | 42 |
|
16 |
| -I will extend this if I need more features, or if anyone else wants to extend this, |
17 |
| -I will add you as a maintainer. |
| 43 | +MIT |
18 | 44 |
|
19 |
| -Provided that you agree that it should replicate the [node.js/crypto](http://nodejs.org/api/crypto.html) api exactly, of course. |
20 | 45 |
|
0 commit comments