{"name":"hmac-blake2b","version":"2.0.0","description":"HMAC backed by BLAKE2b","main":"index.js","dependencies":{"nanoassert":"^1.1.0","sodium-native":"^3.1.1","sodium-universal":"^3.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":"818ed70925798ebf826770fa0f3082937933f2dc","_id":"hmac-blake2b@2.0.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-JbGNtM1YRd8EQH/2vNTAP1oy5lJVPlBFYZfCJTu3k8sqOUm0rRIf/3+MCd5noVykETwTbun6jEOc+4Tu78ubHA==","shasum":"09494e5d245d7afe45d157093080b159f7bacf15","tarball":"http://registry-npm.ywwl.com/hmac-blake2b/download/hmac-blake2b-2.0.0.tgz","fileCount":6,"unpackedSize":12491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9JfxCRA9TVsSAnZWagAAdPEP/1SGhCuPITlzN1E5NGVt\nYUqaY5PAFKcgwidNUuH7QnOp8NF53xMkwWUp7vVd8mBxk4u4PWvqiR4XsU92\nekjQLvY5Ya+hLi+XG+rUx6NlvrJgElk9aM/LWDqyfMP1NYJA7+6a7YJGruH9\nbzaXvksC82zV0OpAx47CfBYm/Huz/Y5zuL0o5Mi1lg7F70IT6Pbt2wf5gW0r\nnDCdvkezw0fwrAzVreNkEvLi9KTjrnrMFe2RA5dwb0vlw122vkGSOPMkTKrY\nsrkqpoVLVzx+4SDH9TQEKB845VVYgougMa43nfAO4Fo0/dEz+5j97MEFrjFk\nIxnQvtoKKks/xPblae9EN6gJJeJkChF3hbdn/CgHtZZHKpaEOAkWMYegXajG\nTWqxiEIp9Nd7ykhJHnbvRZjqOMQYcASEBaeJb4jyXuEzDI+YMgk1ow2bjJCb\nheiyt+/HQiA9vYoypxD0xSFwapVaWteQrxL79G0Kjhw9Dsn8pux7TTeO3uP1\n4y6WR3WdbhKItK7ZxcfyoYFRJrArZqmur8ep9Q2nzdZ4A8kd7Y+7Z9pBfZsO\n+7sklTpq6OsWpspv3e8+Y/K0DeclnJNRRlMI+UQe+8CeSS9dBbfYmh9seXdp\nzF65BU8TyntxJhGq9neGD+WufxaV8DhsBsTn9axZ3PqVJMglx+p3Uu3ux9Xn\n8icR\r\n=sRDV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEdIrWenyS+6YonC0xAH9jLZtsOlEUMLrfZywxKtOMY1AiBxctMn639hKzG+TeS9BONl15mQ+FW0LaUOm43Srvwu7A=="}],"size":3825,"noattachment":false,"key":"/hmac-blake2b/-/hmac-blake2b-2.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_2.0.0_1593087984632_0.6431240476465157"},"_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":1593087984797,"_cnpm_publish_time":1593087984797,"dist-tags":{"latest":"2.0.2"}}