{"name":"hmac-blake2b","version":"0.1.1","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":"a009fd4268bf5b60dba0584fd8495216656d513a","_id":"hmac-blake2b@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"emilbayes","email":"github@tixz.dk"},"dist":{"integrity":"sha512-ytHPmWNY586jSR4vZjitir2zWpxAzzXqFx+CPEL3a3WBeTGY+/ATTFNrcu5MCX0Ppt3Ds8gTYFpMxLqIy1mbwA==","shasum":"ba78d58460b0bcd7812d068780b889884b7bfe75","tarball":"http://registry-npm.ywwl.com/hmac-blake2b/download/hmac-blake2b-0.1.1.tgz","fileCount":5,"unpackedSize":4539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4F13CRA9TVsSAnZWagAAzLcP/RBUGc01UyRf0wwy/eIe\nqeW0KiNjIWIfricpcX53fBjNTROXBGr9Lx/DcC6r4BDDfRHnB+r56PbCx81X\nwnkMxklqTDk9tJ23gpXpV/6Zz2hrxvvLnxQLXd4FX9qj8eKqr92ekD/mSPH2\nEQFza3cX/xJzr9ToWuB4FUg0uGA5Kc4+Yi9k0xjwoHhdyAv9MTD6NSezkFf8\nwVwH79a+x1w3iexN00w+wkClAwVQR1HVdvEz1pTzwwx2jAPGRl4SN/dHhfP3\nA5c682RKV18Q/4GzFA+IdlNGuEhnYB77tSiM2tLRdpakdfgkfyyUew1SmL/4\nV0tAHV8Q5O+Ip8n/VRn63p7mpxt8l0r80ZH85HTXaxLeNAGi7/cKOULE+jmB\n+i8FodG+86gajEvHCLe9PKU5/px3MV6IgJTfsd2s32po9CU9tVTddyDoS97j\n9efONq3br3Jp6mesqfSRm5S4WhhcaEcQRLyNINglX7UxQaMhda49Z0hro2Cm\njjA/kuhCe6QksvRWinCMs/LihwZ+woQGzgKEwbz3EXkITeSB5guOo9urWdAH\nRUTAveOjXp1osg9HrA5Gc2/xGYpD63C3P9T/Y72ZbteroyR55h8NFfnR7AKp\nicHs/FPmpbwjhniP6+6m6QThPNyRqHdDUptV8UI2jzrR/t9uRgmpkN8epiIK\nDmKb\r\n=FWzZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbPD5xi5Ukq9fML3LZQJIsB+TSKjiOkYCOAufYbOgHjgIgF9Oh3TB4e/+ExulVD28JGO3R+zQ8N3l8oTOPLS9nCKc="}],"size":2256,"noattachment":false,"key":"/hmac-blake2b/-/hmac-blake2b-0.1.1.tgz"},"maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hmac-blake2b_0.1.1_1524653431427_0.3012590517978331"},"_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":1524653431531,"_cnpm_publish_time":1524653431531,"dist-tags":{"latest":"2.0.2"}}