You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.6 KiB

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