{"_id":"framed-hash","_rev":"237246","name":"framed-hash","description":"A hash function that wraps all input chunks with a length prefix.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2023-03-24T16:34:03.000Z","created":"2015-06-06T14:28:25.299Z","1.1.0":"2015-06-12T00:21:28.913Z","1.0.1":"2015-06-06T19:55:38.377Z","1.0.0":"2015-06-06T14:28:25.299Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/framed-hash.git"},"versions":{"1.1.0":{"name":"framed-hash","version":"1.1.0","description":"A hash function that wraps all input chunks with a length prefix.","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/framed-hash.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/framed-hash/issues"},"homepage":"https://github.com/mafintosh/framed-hash","gitHead":"43475a43f5a5862a94431d81217295c6240bced6","_id":"framed-hash@1.1.0","_shasum":"d0c2e2afaf37953837dd612df07d14c4fab71d79","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"d0c2e2afaf37953837dd612df07d14c4fab71d79","size":2078,"noattachment":false,"key":"/framed-hash/-/framed-hash-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/framed-hash/download/framed-hash-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1434068488913,"_hasShrinkwrap":false,"_cnpm_publish_time":1434068488913,"_cnpmcore_publish_time":"2021-12-17T00:24:26.490Z"},"1.0.1":{"name":"framed-hash","version":"1.0.1","description":"A hash function that wraps all input chunks with a length prefix.","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/framed-hash.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/framed-hash/issues"},"homepage":"https://github.com/mafintosh/framed-hash","gitHead":"965716331d95f7ba1a0c3d0f54913a9771ec70eb","_id":"framed-hash@1.0.1","_shasum":"32e12f648211bd2559895d02afa68cbe0164ebdd","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"32e12f648211bd2559895d02afa68cbe0164ebdd","size":2066,"noattachment":false,"key":"/framed-hash/-/framed-hash-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/framed-hash/download/framed-hash-1.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1433620538377,"_hasShrinkwrap":false,"_cnpm_publish_time":1433620538377,"_cnpmcore_publish_time":"2021-12-17T00:24:26.885Z"},"1.0.0":{"name":"framed-hash","version":"1.0.0","description":"WIP - nothing to see here","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.0.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/mafintosh/framed-hash.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/framed-hash/issues"},"homepage":"https://github.com/mafintosh/framed-hash","gitHead":"a56336cc156c1c66d248aaaf04d644919782f9db","_id":"framed-hash@1.0.0","_shasum":"0feb01b0a2a9f39f4fbeee730a29b2654ac76287","_from":".","_npmVersion":"2.10.1","_nodeVersion":"2.1.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"0feb01b0a2a9f39f4fbeee730a29b2654ac76287","size":2103,"noattachment":false,"key":"/framed-hash/-/framed-hash-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/framed-hash/download/framed-hash-1.0.0.tgz"},"directories":{},"publish_time":1433600905299,"_hasShrinkwrap":false,"_cnpm_publish_time":1433600905299,"_cnpmcore_publish_time":"2021-12-17T00:24:27.059Z"}},"readme":"# framed-hash\n\nA hash function that wraps all input chunks with a length prefix.\n\n```\nnpm install framed-hash\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/framed-hash.svg?style=flat)](http://travis-ci.org/mafintosh/framed-hash)\n\n## Usage\n\n``` js\nvar framedHash = require('framed-hash')\n\nvar hash = framedHash('sha256')\n\nhash.update('hello')\nhash.update('world')\n\n// prints 9054cf26016be468a8b56b40342bd5b479202a40da9fc9056b1ac4c5070343d8\nconsole.log(hash.digest('hex'))\n\nvar anotherHash = framedHash('sha256')\n\nanotherHash.update('hell')\nanotherHash.update('oworld')\n\n// prints 9cb231ff970f99993c9753364405184fc9024c3f56d98716d90f4913a6c746c0\n// since the input chunks were different\nconsole.log(anotherHash.digest('hex'))\n```\n\n## API\n\n#### `hash = framedHash(algorithm)`\n\nCreate a new hash instance. Algorithm can be anything accepted by `crypto.createHash(algo)`\n\n#### `hash.update(chunk)`\n\nUpdate the hash. Internally the chunk is prefixed with the length of the chunk and a newline\n\n#### `hash.digest(encoding)`\n\nReturns the digest of the hash.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/framed-hash","bugs":{"url":"https://github.com/mafintosh/framed-hash/issues"},"license":"MIT"}