{"_id":"sha256","_rev":"4659307","name":"sha256","description":"Compute SHA256 of bytes or strings.","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"jprichardson","email":""},{"name":"midnightlightning","email":"boydb@midnightdesign.ws"},{"name":"sidazhang","email":"sidazhang89@gmail.com"},{"name":"vbuterin","email":"vbuterin@gmail.com"}],"time":{"modified":"2026-04-10T21:48:02.000Z","created":"2013-11-21T06:43:30.227Z","0.2.0":"2015-03-18T15:30:19.230Z","0.1.1":"2014-01-02T14:02:10.138Z","0.1.0":"2013-11-21T06:43:30.227Z"},"users":{},"repository":{"url":"https://github.com/cryptocoinjs/sha256","type":"git"},"versions":{"0.2.0":{"name":"sha256","version":"0.2.0","description":"Compute SHA256 of bytes or strings.","keywords":["string","strings","sha256","bytes","cryptography"],"devDependencies":{"mocha":"1.*","terst":"0.0.1"},"repository":{"url":"https://github.com/cryptocoinjs/sha256","type":"git"},"main":"./lib/nodecrypto.js","browser":"./lib/sha256.js","dependencies":{"convert-hex":"~0.1.0","convert-string":"~0.1.0"},"scripts":{"test":"mocha"},"gitHead":"fadfc62b13052bd0ea3d0030f618d4a35eed61dc","bugs":{"url":"https://github.com/cryptocoinjs/sha256/issues"},"homepage":"https://github.com/cryptocoinjs/sha256","_id":"sha256@0.2.0","_shasum":"73a0b418daab7035bff86e8491e363412fc2ab05","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.32","_npmUser":{"name":"jprichardson","email":"jprichardson@gmail.com"},"maintainers":[{"name":"jprichardson","email":""},{"name":"midnightlightning","email":"boydb@midnightdesign.ws"},{"name":"sidazhang","email":"sidazhang89@gmail.com"},{"name":"vbuterin","email":"vbuterin@gmail.com"}],"dist":{"shasum":"73a0b418daab7035bff86e8491e363412fc2ab05","size":3657,"noattachment":false,"key":"/sha256/-/sha256-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sha256/download/sha256-0.2.0.tgz"},"directories":{},"publish_time":1426692619230,"_hasShrinkwrap":false,"_cnpm_publish_time":1426692619230,"_cnpmcore_publish_time":"2021-12-16T13:27:36.379Z"},"0.1.1":{"name":"sha256","version":"0.1.1","description":"Compute SHA256 of bytes or strings.","keywords":["string","strings","sha256","bytes","cryptography"],"devDependencies":{"mocha":"1.*","terst":"0.0.1"},"repository":{"url":"https://github.com/cryptocoinjs/sha256","type":"git"},"main":"./lib/sha256.js","dependencies":{"convert-hex":"~0.1.0","convert-string":"~0.1.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/cryptocoinjs/sha256/issues"},"homepage":"https://github.com/cryptocoinjs/sha256","_id":"sha256@0.1.1","dist":{"shasum":"34296f90498da3e8c6b06fffe8e860dba299f902","size":4270,"noattachment":false,"key":"/sha256/-/sha256-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sha256/download/sha256-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.13","_npmUser":{"name":"midnightlightning","email":"boydb@midnightdesign.ws"},"maintainers":[{"name":"jprichardson","email":""},{"name":"midnightlightning","email":"boydb@midnightdesign.ws"},{"name":"sidazhang","email":"sidazhang89@gmail.com"},{"name":"vbuterin","email":"vbuterin@gmail.com"}],"directories":{},"publish_time":1388671330138,"_hasShrinkwrap":false,"_cnpm_publish_time":1388671330138,"_cnpmcore_publish_time":"2021-12-16T13:27:36.730Z"},"0.1.0":{"name":"sha256","version":"0.1.0","description":"Compute SHA256 of bytes or strings.","keywords":["string","strings","sha256","bytes","cryptography"],"devDependencies":{"mocha":"1.*","terst":"0.0.1"},"repository":{"url":"https://github.com/cryptocoinjs/sha256","type":"git"},"main":"./lib/sha256.js","dependencies":{"convert-hex":"~0.1.0","convert-string":"~0.1.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/cryptocoinjs/sha256/issues"},"_id":"sha256@0.1.0","dist":{"shasum":"9eed9e5c62315c3069189713c3dd71163d77e7df","size":2683,"noattachment":false,"key":"/sha256/-/sha256-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sha256/download/sha256-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"jp","email":"jprichardson@gmail.com"},"maintainers":[{"name":"jprichardson","email":""},{"name":"midnightlightning","email":"boydb@midnightdesign.ws"},{"name":"sidazhang","email":"sidazhang89@gmail.com"},{"name":"vbuterin","email":"vbuterin@gmail.com"}],"directories":{},"publish_time":1385016210227,"_hasShrinkwrap":false,"_cnpm_publish_time":1385016210227,"_cnpmcore_publish_time":"2021-12-16T13:27:36.915Z"}},"readme":"# sha256\n\nJavaScript component to compute the SHA256 of strings or bytes.\n\n## DEPRECATION NOTICE\n\nThis library is deprecated. If you think it's important to maintain this library, please submit an issue and the case will be consider or the repo / ownership will be transferred to you. Viable alternatives:\n\n1. Use Browserify\n2. https://www.npmjs.com/package/sha.js (used by Browserify)\n3. https://github.com/indutny/hash.js\n\n\n## Install\n\n### Node.js/Browserify\n\n    npm install --save sha256\n\nNote: when Node.js is detected, the Node [`Crypto`](http://nodejs.org/api/crypto.html) component is used instead of re-implementing the SHA256 hash logic.\n\n\n\n## Usage\n\nThere are two methods, one for computing the hash of the input, and one for double-hashing it:\n\n```js\nsha256('hello');   // \"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\"\nsha256.x2('hello'); // \"d7914fe546b684688bb95f4f888a92dfc680603a75f23eb823658031fff766d9\"\n```\n\nInput is either an array of bytes or a string. **String are always interpreted as binary data**; if you have a hex-encoded string of data to parse, first convert it to a binary string or array of bytes.\n\nOutput by default is a hexadecimal-encoded string. Other options are an array of bytes, or a binary-encoded string:\n\n```js\nsha256('hello');   // \"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\" <= Hex-encoded; default\nsha256('hello', { asBytes: true }); // [44,242,77,186,95,176,163,14,38,232,59,42,197,185,226,158,27,22,30,92,31,167,66,94,115,4,51,98,147,139,152,36] <= Array of bytes\nsha256('hello', { asString: true }); // \",òMº_°£&è;*Å¹â\\§B^s3b$\" <= Binary-encoded string\n```\n\n## Test\n\nUnit tests are written in [Mocha](http://visionmedia.github.io/mocha/). To run the test suite, checkout the git repository, and from within the base folder run:\n\n```sh\n$ npm install --dev\n$ npm test\n```\n\n# Credits\n\nMost of the code from CryptoJS https://code.google.com/p/crypto-js/\n\n# License\n\n(MIT License)\n\nCopyright 2013, JP Richardson  <jprichardson@gmail.com>","_attachments":{},"homepage":"https://github.com/cryptocoinjs/sha256","bugs":{"url":"https://github.com/cryptocoinjs/sha256/issues"}}