{"name":"js-sha1","version":"0.1.3","description":"A simple SHA1 hash function for JavaScript supports UTF-8 encoding.","main":"src/sha1.js","devDependencies":{"expect.js":"~0.3.1","jscoverage":"~0.5.9"},"scripts":{"test":"mocha tests/node-test.js -r jscoverage","coveralls":"mocha tests/node-test.js -R mocha-lcov-reporter -r jscoverage | coveralls"},"repository":{"type":"git","url":"https://github.com/emn178/js-sha1.git"},"keywords":["sha","sha1","encryption","cryptography","HMAC"],"license":"MIT","author":{"name":"emn178","email":"emn178@gmail.com"},"homepage":"https://github.com/emn178/js-sha1","bugs":{"url":"https://github.com/emn178/js-sha1/issues"},"_id":"js-sha1@0.1.3","dist":{"shasum":"5db063f0bca2ff9fce06c21f766bce3af27b3cc6","tarball":"http://registry-npm.ywwl.com/js-sha1/download/js-sha1-0.1.3.tgz","integrity":"sha512-7Lqv6wiHismFZgq84kdG+rD1AcZWJIAScxM7QyfxaG0m5g1NMnBlQ7HBht5F61/8/QmHtFv5KpKOIUx7ugyLTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAmZmTnqAJ/15Vfzltwu3aQweG7xB3CqYbu1uo5cz8ycAiAT1UyNhX4JTSvi4g0nVNSdS7Lr5TyP0UrNqxj4uKEEuA=="}],"size":5617,"noattachment":false,"key":"/js-sha1/-/js-sha1-0.1.3.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"emn178","email":"emn178@gmail.com"},"maintainers":[{"name":"emn178","email":"emn178@gmail.com"}],"directories":{},"readme":"# js-sha1\n[![Build Status](https://travis-ci.org/emn178/js-sha1.svg?branch=master)](https://travis-ci.org/emn178/js-sha1)\n[![Coverage Status](https://coveralls.io/repos/emn178/js-sha1/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-sha1?branch=master)  \n[![NPM](https://nodei.co/npm/js-sha1.png?stars&downloads)](https://nodei.co/npm/js-sha1/)  \nA simple SHA1 hash function for JavaScript supports UTF-8 encoding.\n\n## Demo\n[SHA1 Online](http://emn178.github.io/online-tools/sha1.html)\n[SHA1 File Checksum Online](https://emn178.github.io/online-tools/sha1_checksum.html)\n\n## Download\n[Compress](https://raw.github.com/emn178/js-sha1/master/build/sha1.min.js)  \n[Uncompress](https://raw.github.com/emn178/js-sha1/master/src/sha1.js)\n\n## Installation\nYou can also install js-sha1 by using Bower.\n\n    bower install js-sha1\n\nFor node.js, you can use this command to install:\n\n    npm install js-sha1\n\n## Notice\nNIST formally deprecated use of SHA-1 in 2011 and disallowed its use for digital signatures in 2013, and declared that it should be phased out by 2030. However, SHA-1 is still secure for HMAC. [wiki](https://en.wikipedia.org/wiki/SHA-1)\n\n## Usage\nYou could use like this:\n```JavaScript\nsha1('Message to hash');\nvar hash = sha1.create();\nhash.update('Message to hash');\nhash.hex();\n\n// HMAC\nsha1.hmac('key', 'Message to hash');\n\nvar hash = sha1.hmac.create('key');\nhash.update('Message to hash');\nhash.hex();\n```\n\n### Node.js\nIf you use node.js, you should require the module first:\n```JavaScript\nvar sha1 = require('js-sha1');\n```\n\n### TypeScript\nIf you use TypeScript, you can import like this:\n```TypeScript\nimport { sha1 } from 'js-sha1';\n```\n\n## RequireJS\nIt supports AMD:\n```JavaScript\nrequire(['your/path/sha1.js'], function(sha1) {\n// ...\n});\n```\n\n## Example\n```JavaScript\nsha1(''); // da39a3ee5e6b4b0d3255bfef95601890afd80709\nsha1('The quick brown fox jumps over the lazy dog'); // 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12\nsha1('The quick brown fox jumps over the lazy dog.'); // 408d94384216f890ff7a0c3528e8bed1e0b01621\n\n// It also supports UTF-8 encoding\nsha1('中文'); // 7be2d2d20c106eee0836c9bc2b939890a78e8fb3\n\n// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`\nsha1([]); // da39a3ee5e6b4b0d3255bfef95601890afd80709\nsha1(new Uint8Array([])); // da39a3ee5e6b4b0d3255bfef95601890afd80709\n\n// Different output\nsha1(''); // da39a3ee5e6b4b0d3255bfef95601890afd80709\nsha1.hex(''); // da39a3ee5e6b4b0d3255bfef95601890afd80709\nsha1.array(''); // [218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]\nsha1.digest(''); // [218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]\nsha1.arrayBuffer(''); // ArrayBuffer\n\n// HMAC\nsha1.hmac.hex('key', 'Message to hash');\nsha1.hmac.array('key', 'Message to hash');\n// ...\n```\n\n## License\nThe project is released under the [MIT license](http://www.opensource.org/licenses/MIT).\n\n## Contact\nThe project's website is located at https://github.com/emn178/js-sha1  \nAuthor: Chen, Yi-Cyuan (emn178@gmail.com)\n","publish_time":1420633938862,"_cnpm_publish_time":1420633938862,"dist-tags":{"latest":"0.7.0"}}