{"_id":"crypto2","_rev":"326301","name":"crypto2","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"time":{"modified":"2021-06-07T02:44:46.000Z","created":"2014-09-30T12:40:11.215Z","2.0.0":"2018-05-01T16:12:14.442Z","1.0.3":"2018-03-31T07:14:11.415Z","1.0.2":"2018-02-12T19:30:48.731Z","1.0.1":"2018-02-10T13:09:47.068Z","1.0.0":"2018-02-09T08:37:30.391Z","0.3.3":"2017-12-13T10:30:41.052Z","0.3.2":"2017-03-12T15:18:41.746Z","0.3.1":"2016-12-20T17:29:13.242Z","0.3.0":"2016-06-01T09:57:48.829Z","0.2.3":"2015-02-13T00:54:02.844Z","0.2.2":"2014-10-01T09:26:25.623Z","0.2.0":"2014-09-30T12:40:11.215Z"},"users":{"rocket0191":true},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"versions":{"2.0.0":{"name":"crypto2","version":"2.0.0","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Joe Bell","email":"joe@jb-labs.uk"},{"name":"George Agathos","email":"gagathos@thecommotion.com"}],"main":"dist/crypto2.js","dependencies":{"babel-runtime":"6.26.0","node-rsa":"0.4.2","util.promisify":"1.0.0"},"devDependencies":{"assertthat":"1.0.0","roboter":"1.0.2"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"b9c81b1a295a016760d701fc52cd1e3ae8c8354a","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@2.0.0","_npmVersion":"6.0.0","_nodeVersion":"8.11.1","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"5539f45b283d8c2bdca0ea4faf8b34014a4ea2cd","size":10030,"noattachment":false,"key":"/crypto2/-/crypto2-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-2.0.0.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto2_2.0.0_1525191134381_0.2849249135203147"},"_hasShrinkwrap":false,"publish_time":1525191134442,"_cnpm_publish_time":1525191134442},"1.0.3":{"name":"crypto2","version":"1.0.3","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Joe Bell","email":"joe@jb-labs.uk"},{"name":"George Agathos","email":"gagathos@thecommotion.com"}],"main":"dist/crypto2.js","dependencies":{"babel-runtime":"6.26.0","node-rsa":"0.4.2","util.promisify":"1.0.0"},"devDependencies":{"assertthat":"1.0.0","roboter":"github:thenativeweb/roboter#vnext"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"5a441dc1ec5c4364be643a4e7a1033dbfac93992","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@1.0.3","_npmVersion":"5.8.0","_nodeVersion":"8.9.4","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"e5ebd1fc2eb4ebfbcd2e46c66bc7600b18a4c89b","size":9545,"noattachment":false,"key":"/crypto2/-/crypto2-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-1.0.3.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto2_1.0.3_1522480451256_0.07137766184957428"},"_hasShrinkwrap":false,"publish_time":1522480451415,"_cnpm_publish_time":1522480451415},"1.0.2":{"name":"crypto2","version":"1.0.2","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Joe Bell","email":"joe@jb-labs.uk"}],"main":"dist/crypto2.js","dependencies":{"babel-runtime":"6.26.0","node-rsa":"0.4.2","util.promisify":"1.0.0"},"devDependencies":{"assertthat":"1.0.0","roboter":"0.16.0","roboter-server":"0.16.0"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"5ecb76f49e358323f0102c20ad7e5140d0eb49c5","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"5e5cc1ae85165b53c8da954215c08a4451565afd","size":10135,"noattachment":false,"key":"/crypto2/-/crypto2-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-1.0.2.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto2_1.0.2_1518463847970_0.2997788826518022"},"_hasShrinkwrap":false,"publish_time":1518463848731,"_cnpm_publish_time":1518463848731},"1.0.1":{"name":"crypto2","version":"1.0.1","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Joe Bell","email":"joe@jb-labs.uk"}],"main":"dist/crypto2.js","dependencies":{"babel-polyfill":"6.26.0","node-rsa":"0.4.2","util.promisify":"1.0.0"},"devDependencies":{"assertthat":"1.0.0","roboter":"0.15.6","roboter-server":"0.15.6"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"6c2c20c4341f01d7e474653aed64b968464b8b72","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"ef1b433c0aa19b85720a56b05e69c68cca0c2449","size":10172,"noattachment":false,"key":"/crypto2/-/crypto2-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-1.0.1.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto2_1.0.1_1518268186362_0.28489567037163055"},"_hasShrinkwrap":false,"publish_time":1518268187068,"_cnpm_publish_time":1518268187068},"1.0.0":{"name":"crypto2","version":"1.0.0","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Joe Bell","email":"joe@jb-labs.uk"}],"main":"dist/crypto2.js","dependencies":{"node-rsa":"0.4.2","util.promisify":"1.0.0"},"devDependencies":{"assertthat":"1.0.0","roboter":"0.15.6","roboter-server":"0.15.6"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"4bc44af64be51b2586e6c348a093ce743175840d","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"37e7ad89f721944d2164a1a5b7ce43ae377b2aa2","size":10140,"noattachment":false,"key":"/crypto2/-/crypto2-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-1.0.0.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto2_1.0.0_1518165449559_0.3821052010299262"},"_hasShrinkwrap":false,"publish_time":1518165450391,"_cnpm_publish_time":1518165450391},"0.3.3":{"name":"crypto2","version":"0.3.3","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Joe Bell","email":"joe@jb-labs.uk"}],"main":"dist/crypto2.js","dependencies":{"node-rsa":"0.4.2"},"devDependencies":{"assertthat":"0.11.0","roboter":"0.15.4","roboter-server":"0.15.4"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"8b209cdc8b53e72420ff10d997c03492fecbc145","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@0.3.3","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"dd348cc17937e3b37c9572cc5e6439dbf9024eab","size":8665,"noattachment":false,"key":"/crypto2/-/crypto2-0.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-0.3.3.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto2-0.3.3.tgz_1513161040961_0.48519998462870717"},"directories":{},"publish_time":1513161041052,"_hasShrinkwrap":false,"_cnpm_publish_time":1513161041052},"0.3.2":{"name":"crypto2","version":"0.3.2","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Joe Bell","email":"joe@jb-labs.uk"}],"main":"lib/crypto2.js","dependencies":{"node-rsa":"0.4.2"},"devDependencies":{"assertthat":"0.8.2","roboter":"0.13.15","roboter-server":"0.13.15"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"6234f6bb9a8aa2e2f807f2758a154a971a6e160e","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@0.3.2","scripts":{},"_shasum":"e4d4b1cd79fb3feb2f26872a3e5c31d702bea448","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"e4d4b1cd79fb3feb2f26872a3e5c31d702bea448","size":7770,"noattachment":false,"key":"/crypto2/-/crypto2-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-0.3.2.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/crypto2-0.3.2.tgz_1489331921039_0.06549126910977066"},"directories":{},"publish_time":1489331921746,"_cnpm_publish_time":1489331921746,"_hasShrinkwrap":false},"0.3.1":{"name":"crypto2","version":"0.3.1","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"}],"main":"lib/crypto2.js","dependencies":{"node-rsa":"0.4.2"},"devDependencies":{"assertthat":"0.8.2","roboter":"0.13.15","roboter-server":"0.13.15"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"60f67c43eabb89eead24375d793cb40be0da87f6","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@0.3.1","scripts":{},"_shasum":"bd729e4ad20214db52ef3e326f63aceedc6caf15","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"bd729e4ad20214db52ef3e326f63aceedc6caf15","size":7734,"noattachment":false,"key":"/crypto2/-/crypto2-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-0.3.1.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/crypto2-0.3.1.tgz_1482254952487_0.04298584721982479"},"directories":{},"publish_time":1482254953242,"_cnpm_publish_time":1482254953242,"_hasShrinkwrap":false},"0.3.0":{"name":"crypto2","version":"0.3.0","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"}],"main":"lib/crypto2.js","dependencies":{"node-rsa":"0.3.2"},"devDependencies":{"assertthat":"0.7.0","roboter":"0.8.0"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"keywords":["cryptography","encryption","hash","security"],"license":"MIT","gitHead":"cc78250dae9e6869a7ed71d7418b7701c2dd7fd1","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2#readme","_id":"crypto2@0.3.0","scripts":{},"_shasum":"69305509d3784a5b487f2d8a77965c933f106b87","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"goloroden","email":"webmaster@goloroden.de"},"dist":{"shasum":"69305509d3784a5b487f2d8a77965c933f106b87","size":7748,"noattachment":false,"key":"/crypto2/-/crypto2-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-0.3.0.tgz"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/crypto2-0.3.0.tgz_1464775067720_0.7031257313210517"},"directories":{},"publish_time":1464775068829,"_cnpm_publish_time":1464775068829,"_hasShrinkwrap":false},"0.2.3":{"name":"crypto2","version":"0.2.3","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"}],"main":"lib/crypto2.js","dependencies":{"node-rsa":"0.2.13"},"devDependencies":{"assertthat":"0.4.2","grunt":"0.4.5","tourism":"0.13.2"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"license":"MIT","gitHead":"2dedefd7e3a41f640f99090e84ff9418e00fbb0d","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2","_id":"crypto2@0.2.3","scripts":{},"_shasum":"582bcf80de0dbe88123875ce82df5fdc5fe6ae0c","_from":".","_npmVersion":"2.5.1","_nodeVersion":"1.2.0","_npmUser":{"name":"thenativeweb","email":"hello@thenativeweb.io"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"dist":{"shasum":"582bcf80de0dbe88123875ce82df5fdc5fe6ae0c","size":7551,"noattachment":false,"key":"/crypto2/-/crypto2-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-0.2.3.tgz"},"directories":{},"publish_time":1423788842844,"_cnpm_publish_time":1423788842844,"_hasShrinkwrap":false},"0.2.2":{"name":"crypto2","version":"0.2.2","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"}],"main":"lib/crypto2.js","dependencies":{"node-rsa":"0.1.53"},"devDependencies":{"grunt":"0.4.5","node-assertthat":"0.2.1","tourism":"0.7.3"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"license":"MIT","gitHead":"19be3cc356cb421248dfc411475d1b5336b9dc9c","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2","_id":"crypto2@0.2.2","scripts":{},"_shasum":"204447515d34fb02206ccf7cbd73355301aa3666","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"thenativeweb","email":"hello@thenativeweb.io"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"dist":{"shasum":"204447515d34fb02206ccf7cbd73355301aa3666","size":7388,"noattachment":false,"key":"/crypto2/-/crypto2-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-0.2.2.tgz"},"directories":{},"publish_time":1412155585623,"_cnpm_publish_time":1412155585623,"_hasShrinkwrap":false},"0.2.0":{"name":"crypto2","version":"0.2.0","description":"crypto2 is a convenience wrapper around Node.js' crypto module.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"}],"main":"lib/crypto2.js","dependencies":{"node-rsa":"0.1.53"},"devDependencies":{"grunt":"0.4.5","node-assertthat":"0.2.1","tourism":"0.7.3"},"repository":{"type":"git","url":"git://github.com/thenativeweb/crypto2.git"},"license":"MIT","gitHead":"32141049334e18f23178bd8fabc175cb3389baf3","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"homepage":"https://github.com/thenativeweb/crypto2","_id":"crypto2@0.2.0","scripts":{},"_shasum":"5c722f7c8fb0eee23bf0c3d2d3cb72ff9a4e41a1","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"thenativeweb","email":"hello@thenativeweb.io"},"maintainers":[{"name":"goloroden","email":"webmaster@goloroden.de"},{"name":"nhummel","email":"hummel@marvelous.systems"},{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"}],"dist":{"shasum":"5c722f7c8fb0eee23bf0c3d2d3cb72ff9a4e41a1","size":7264,"noattachment":false,"key":"/crypto2/-/crypto2-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/crypto2/download/crypto2-0.2.0.tgz"},"directories":{},"publish_time":1412080811215,"_cnpm_publish_time":1412080811215,"_hasShrinkwrap":false}},"readme":"# crypto2\n\ncrypto2 is a convenience wrapper around Node.js' crypto module.\n\n## Installation\n\n```shell\n$ npm install crypto2\n```\n\n## Quick start\n\nFirst you need to integrate crypto2 with your application. For that add a reference to the `crypto2` module.\n\n```javascript\nconst crypto2 = require('crypto2');\n```\n\n### Creating passwords\n\nFor encrypting and decrypting you will need a password. To create a secure password, run the `createPassword` function and hand over a secret key:\n\n```javascript\nconst password = await crypto2.createPassword('secret');\n```\n\nBy default, `createPassword` returns passwords with 32 bytes length. If you have to use passwords of a different length, provide the number of bytes you want the password to have:\n\n```javascript\nconst password = await crypto2.createPassword('secret', 64);\n```\n\n*Please note that running `createPassword` twice with the same key results in two different passwords, so you must store the generated password. It can not be recovered if you lost it, even if you know the original key.*\n\n### Creating and managing keys\n\nFor signing and verifying as well as for encrypting and decrypting using asymmetric encryption algorithms you will need a PEM encoded private and public key pair. You can use the `openssl` command-line tool to create both of them:\n\n```shell\n$ openssl genrsa -out privateKey.pem 2048\n$ openssl rsa -in privateKey.pem -pubout > publicKey.pem\n```\n\nAlternatively the key pair may be created programmatically by calling the `createKeyPair` function. This function creates a 2048-bit strong RSA key pair in PEM format:\n\n```javascript\nconst { privateKey, publicKey } = await crypto2.createKeyPair();\n```\n\nTo load a private key from a `.pem` file call the `readPrivateKey` function and specify the name of the key file:\n\n```javascript\nconst privateKey = await crypto2.readPrivateKey('key.pem');\n```\n\nTo load a public key from a `.pub` file call the `readPublicKey` function and specify the name of the key file:\n\n```javascript\nconst publicKey = await crypto2.readPublicKey('key.pub');\n```\n\n### Symmetrically encrypting and decrypting\n\nIf you want crypto2 to select an encryption algorithm for you, call the `encrypt` and `decrypt` functions without any specific algorithm. This defaults to the AES 256 CBC encryption algorithm. Please note that you must provide an initialization vector (*iv*). To create one, use the `createIv` function:\n\n```javascript\nconst password = await crypto2.createPassword('secret');\n// => [...]\n\nconst iv = await crypto2.createIv();\n// => [...]\n\nconst encrypted = await crypto2.encrypt('the native web', password, iv);\n// => [...]\n\nconst decrypted = await crypto2.decrypt(encrypted, password, iv);\n// => the native web\n```\n\nTo encrypt and decrypt using the AES 256 CBC encryption algorithm call the `encrypt.aes256cbc` and `decrypt.aes256cbc` functions:\n\n```javascript\nconst password = await crypto2.createPassword('secret');\n// => [...]\n\nconst iv = await crypto2.createIv();\n// => [...]\n\nconst encrypted = await crypto2.encrypt.aes256cbc('the native web', password, iv);\n// => [...]\n\nconst decrypted = await crypto2.decrypt.aes256cbc(encrypted, password, iv);\n// => the native web\n```\n\n### Asymmetrically encrypting and decrypting\n\nTo encrypt and decrypt using the asymmetric RSA encryption algorithm call the `encrypt.rsa` and `decrypt.rsa` functions. Due to technical limitations of the RSA algorithm the text to be encrypted must not be longer than 215 bytes when using keys with 2048 bits:\n\n```javascript\nconst encrypted = await crypto2.encrypt.rsa('the native web', publicKey);\n// => [...]\n\nconst decrypted = await crypto2.decrypt.rsa(encrypted, privateKey);\n// => the native web\n```\n\n### Signing and verifying\n\nIf you want crypto2 to select a signing algorithm for you, call the `sign` and `verify` functions without any specific algorithm. This defaults to the SHA256 signing algorithm:\n\n```javascript\nconst signature = await crypto2.sign('the native web', privateKey);\n// => [...]\n\nconst isSignatureValid = await crypto2.verify('the native web', publicKey, signature);\n// => true\n```\n\nTo sign and verify using the SHA256 signing algorithm call the `sign.sha256` and `verify.sha256` functions:\n\n```javascript\nconst signature = await crypto2.sign.sha256('the native web', privateKey);\n// => [...]\n\nconst isSignatureValid = await crypto2.verify.sha256('the native web', publicKey, signature);\n// => true\n```\n\n### Hashing\n\nIf you want crypto2 to select a hash algorithm for you, call the `hash` function without any specific algorithm. This defaults to the SHA256 hash algorithm:\n\n```javascript\nconst hash = await crypto2.hash('the native web');\n// => 55a1f59420da66b2c4c87b565660054cff7c2aad5ebe5f56e04ae0f2a20f00a9\n```\n\nTo calculate the MD5 hash value of a string call the `hash.md5` function:\n\n```javascript\nconst hash = await crypto2.hash.md5('the native web');\n// => 4e8ba2e64931c64b63f4dc8d90e1dc7c\n```\n\nTo calculate the SHA1 hash value of a string call the `hash.sha1` function:\n\n```javascript\nconst hash = await crypto2.hash.sha1('the native web');\n// => cc762e69089ee2393b061ab26a005319bda94744\n```\n\nTo calculate the SHA256 hash value of a string call the `hash.sha256` function:\n\n```javascript\nconst hash = await crypto2.hash.sha256('the native web');\n// => 55a1f59420da66b2c4c87b565660054cff7c2aad5ebe5f56e04ae0f2a20f00a9\n```\n\n### Message authentication\n\nIf you want crypto2 to select a HMAC algorithm for you, call the `hmac` function without any specific algorithm. This defaults to the SHA256 hash algorithm:\n\n```javascript\nconst hmac = await crypto2.hmac('the native web', 'secret');\n// => 028e3043f9d848e346c8a93c4c29b091cb871065b6f5d1199f38e5a7360532f4\n```\n\nTo calculate the SHA1-based HMAC value of a string call the `hmac.sha1` function:\n\n```javascript\nconst hmac = await crypto2.hmac.sha1('the native web', 'secret');\n// => c9a6cdb2d350820e76a14f4f9a6392990ce1982a\n```\n\nTo calculate the SHA256-based HMAC value of a string call the `hmac.sha256` function:\n\n```javascript\nconst hmac = await crypto2.hmac.sha256('the native web', 'secret');\n// => 028e3043f9d848e346c8a93c4c29b091cb871065b6f5d1199f38e5a7360532f4\n```\n\n## Running the build\n\nTo build this module use [roboter](https://www.npmjs.com/package/roboter).\n\n```shell\n$ npx roboter\n```\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2013-2018 the native web.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/thenativeweb/crypto2#readme","bugs":{"url":"https://github.com/thenativeweb/crypto2/issues"},"license":"MIT"}