{"name":"hmac-blake2b","version":"1.0.0","description":"HMAC backed by BLAKE2b","main":"index.js","dependencies":{"nanoassert":"^1.1.0","sodium-native":"^3.1.1"},"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":"f435445fac0b873560d71a3df25e2faa4e87c130","_id":"hmac-blake2b@1.0.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-sOdcBvyOQPHYjTOVmE4y1C8SlZDRJmKkAgWMFjoX6URTk7mbP35+QLzE4ZwfcScnP3r3NB3yV0vqJaofrWCMMQ==","shasum":"5cb18da6506d012658676a08a04b62fbad6e2601","tarball":"http://registry-npm.ywwl.com/hmac-blake2b/download/hmac-blake2b-1.0.0.tgz","fileCount":6,"unpackedSize":12388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerA1qCRA9TVsSAnZWagAAkCMP/A/oBjszxsrTkNJcIa6y\nbS4ReKhJN7Fq0JFJaLkiCm2sph0f57ZRHws9cellIB1ik34PzY00LGjHzcXA\nvDF0kjaU60kQTeMRaeeb1b6RzOoXuQNfE+w9AKYxh6BKDB4nmH8+sU19mqQ+\nGvjyE2M68EhhWUyLvy6O8HP8i7GD/GT+GAsb8k1cY5TBhdjkzCl+y9V+UsZs\nj5XGSyLpA7A3pz5TDZ7YEzHjiTRf1o3Cpj7equgLGh84CtiE40uml3ZwqcuS\njvBvDg7XhTpfddtIGvwk1wK0rZ/WE50qRw9yg8mOxg7G9GtIyaqkqahHcUTl\nHBfMAlxIGdus2rV4L4vxyQ5HEeM7CvQaRWX2vkzkN9diO0KiLvPDFRDTW0Rh\nhYQCZYgwcxlJjpc/e0/4Zf5dJ68EY0Y7CKWI9ruJf0RBvcQKOenJvjk+upN1\nOjo/lgPKCOPwhW3vPONib4NTf2RwMcHIsy7xIfLw22ixpLSNJSA4C7I1CfAh\nO+LfaYaUEbNdT2UUl1KdXyCy6OVf2Ko3XbzMhObTeExiR/KTkYNm1Vqopq/W\nan6Kw10hPGqICQXbjp5w5KRzs5tmF1hTGyv4vrEZzq+VXLfzdBQd5+tHesNX\noO+5Ct6nUUWo/iO5wEhe9tli7xx1OhlebxUAYdZqvBFnI28L4YBtQi8lhYte\ntN/G\r\n=KtJs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5LatbJJYC1Xm1KlUAErQvTFSDkd7OYpxD/BiznRkbpAiEArgA7vn0+Ghm53ynERb2DvOResEbW/A78bAs8n56AOz0="}],"size":3776,"noattachment":false,"key":"/hmac-blake2b/-/hmac-blake2b-1.0.0.tgz"},"maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"_npmUser":{"name":"emilbayes","email":"github@tixz.dk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hmac-blake2b_1.0.0_1588333929997_0.06392327317968438"},"_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":1588333930108,"_cnpm_publish_time":1588333930108,"dist-tags":{"latest":"2.0.2"}}