{"name":"hmac-blake2b","version":"0.2.0","description":"HMAC backed by BLAKE2b","main":"index.js","dependencies":{"nanoassert":"^1.1.0","sodium-universal":"^2.0.0"},"devDependencies":{"tape":"^4.8.0"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/emilbayes/hmac-blake2b.git"},"keywords":["hmac","blake2b"],"author":{"name":"Emil Bay","email":"github@tixz.dk"},"license":"ISC","bugs":{"url":"https://github.com/emilbayes/hmac-blake2b/issues"},"homepage":"https://github.com/emilbayes/hmac-blake2b#readme","gitHead":"c3c053cffdb126f8c549c00d5a110f9e80052281","_id":"hmac-blake2b@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"emilbayes","email":"github@tixz.dk"},"dist":{"integrity":"sha512-cJpnWOYMtaLr+3O32OII7DSTmQh+BKoeLXw49UAIc2QU68UwD2iBjItwxRVHmu1GBTuHeqME+rq7GpW2rBncCQ==","shasum":"f8c71699dc834ce8066a512ba0592eda572bff4c","tarball":"http://registry-npm.ywwl.com/hmac-blake2b/download/hmac-blake2b-0.2.0.tgz","fileCount":6,"unpackedSize":12306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4jS/CRA9TVsSAnZWagAACccP/j+3e4in59ic3umzMLY/\nlo8c23Yz0iM3ombTbWGulzRLG/nXyTNsedjunSvePGu2r8F9/oHe0VIxUc6r\ncsFFmqhnxrIyjS5ig40WiSq3aHMUJdnDjul9HGtw+kL7eV2ouJkQ1QXUV22n\ngPwuMk82ogjnMrFj52GI8NAImv4enKCMNHb0OfiUBs0pHVeAKLLQYPwUKeif\nLEKjosk8Py4pz4cgOhjQcoyeELjNvb9eu8PhF+q4m1Bap7cR5fAniYVFjWZ6\n1f5hmLmL5dTTwmTnKocuLH7fNAdqQ5bIoEA9frf6hpUnUUYOszHfOoUqX0Dd\nTkyAOO5tfc0Xfgux2nxzSKDoIhzWVGsiRB8LeEqmlb6dLMlzzq32tXFVnNm0\nUkhwa+GTo1bXEDP+y1HqdOjWdUz8OtqC+Ap/4A2/q4VV4P+uqoFCh1Kj9JrQ\n1+0jYGoTVLS3I6MQlKvNkNb9YO/gP80ged+xGgJ5W0NtnIugCIb+f1fY44jb\nhc4+dM689L4mJObXcV2lINfn5v1EVq/q2I/DeyeX0PXgIT2A7UcbYg/25Cha\nEFnaRTnfALOO9adikcg6L9Qwp7p3M9+Uod4/gfCHqf9OSj+iSE44Z0UrApyn\nP4670WV29zTcBYntUMoZY41QQBu00X8ynFYRfKJ89HPTS+UwvJPB5oavKii/\nDb1C\r\n=HS3i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/bI+ePb7BMW0jNZgrAJMMnNPeOmDYAw0VZ2kV1XUjjAiEAgiU5r68Gdl5rtQSgu5tAtB2A6u9gNoKMtTyuT/l7/LE="}],"size":3726,"noattachment":false,"key":"/hmac-blake2b/-/hmac-blake2b-0.2.0.tgz"},"maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hmac-blake2b_0.2.0_1524774078572_0.2935011188093788"},"_hasShrinkwrap":false,"readme":"# `hmac-blake2b`\n\n[![Build Status](https://github.com/emilbayes/hmac-blake2b/actions/workflows/npm.yml/badge.svg)](https://github.com/emilbayes/hmac-blake2b/actions/workflows/npm.yml)\n\n> HMAC based on BLAKE2b\n\nEven though BLAKE2b is designed to also work as a MAC, specifications like\n[Noise](http://noiseprotocol.org/noise.html#hash-functions-and-hashing) call for\na HMAC.\n\n## Usage\n\n```js\nconst { randombytes_buf } = require('sodium-universal/randombytes')\nconst hmac = require('.')\n\nconst mac = Buffer.alloc(hmac.BYTES)\nconst key = Buffer.alloc(hmac.KEYBYTES)\nrandombytes_buf(key)\n\nconst data = Buffer.from('some data')\n\nhmac(mac, data, key)\n\n```\n\n## API\n\n### `hmac.BYTES`\n\nSize of the output MAC in bytes\n\n### `hmac.KEYBYTES`\n\n[RFC2104](https://www.ietf.org/rfc/rfc2104.txt) recommended size of the key in\nbytes.\n\n### `hmac(out, data, key)`\n\nComputes a HMAC from `data` with `key` and writes it into `out`.\n\n* `out` must be a `Buffer` or `Uint8Array` of length `hmac.BYTES`\n* `data` must be a `Buffer`, `Uint8Array` or `Array` of `Buffer`s or\n  `Uint8Array`s.\n* `key` must be a `Buffer` or `Uint8Array`. Per the HMAC spec `key` can be as\n  small as 1 byte, in which case it is right-padded with `NUL` bytes, or any\n  size larger than `hmac.KEYBYTES` in which case it is hashed down to fit. The\n  recommended size by the spec is `hmac.KEYBYTES`\n\n## Install\n\n```sh\nnpm install hmac-blake2b\n```\n\n## License\n\n[ISC](LICENSE)\n","publish_time":1524774078650,"_cnpm_publish_time":1524774078650,"dist-tags":{"latest":"2.0.2"}}