{"name":"hmac-blake2b","version":"0.1.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":"e6ab10b6efbec93100268f2f3633e5e2fa475189","_id":"hmac-blake2b@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"emilbayes","email":"github@tixz.dk"},"dist":{"integrity":"sha512-HLq2ZWcYvfLfdst+86ejYXZIPr/tcvmGZpxtvKME9euj/a/cAA05y3KbMugbOuO0nCixToMzRNYfK7DF5C5BAw==","shasum":"6916c498b3d77c349238541c1fede45366a047b3","tarball":"http://registry-npm.ywwl.com/hmac-blake2b/download/hmac-blake2b-0.1.0.tgz","fileCount":5,"unpackedSize":4533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4ECwCRA9TVsSAnZWagAAj7EP/0z1BDQaYLE6rK/TZykN\n/u8Ugw15t9DezqNa7yET7gm7+Omk/lBW9vIf+jbFs0EdbRsltwyOlChf6CSj\ns0oHUBCPKhm+ah8IP01fM9P2WC7CscgmqBJ88+sanFAyO+utHHuiAFdUe89y\niVTBuUqKEkEkedjnY8Rf7QgrSmGVvtD4bPywxAqdVIBRLT7NczAkKCvbz/4U\noy+I1p+VgST4eqFxN4U9SLacNQJ66IuXpPPiFEtiztsl2HWSSLi7U7QnUjQV\nWq6gAdMSDUBSVQBnthRVLJVc6M+vQQYD1QPF72ERl6RfoLunGJCVjRJm02WM\nQxFS9sJL6li3OnOijMpN7MBet+enWKT4bw73JXVfjwutA7DQ0z8kyDp+1fIg\nov4buVif59PY/i1HAR4gLq3XhcIcFK2sgeIzZrXf2VTwyv9WGyVCi8jb87G8\n2fRF1G1fVyuvKoOWWpR6fTbpwizX+pk+zlfTYaZfiHXuJ8oOMsp5ptT5LwO0\nMbZT536ZaKOlhaKHRiNAwE583dW+l72AekguoaMDOLgXFTE/nipkaK/svFL0\nl+JjfFrg6cUpOCtVCPfOaumu38OSl771F/6chUgDmZiRD8cJL+S4g3LOGZTX\nDtIQ86ToY1CEgE1cy9d32eA0NcApCGTQVdXSO0fukJNzzEx4Cs71ta4WWAtT\nzu4a\r\n=6AWm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCACBSeUL+FOwVphl7n84PzkxBdyFDVA67VQ+/ahUjoJQIgL/K/jJOAnJX9ewv0/f3Ri5zmxCY1UJW8dQGEuNMS9Mw="}],"size":2250,"noattachment":false,"key":"/hmac-blake2b/-/hmac-blake2b-0.1.0.tgz"},"maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hmac-blake2b_0.1.0_1524646063438_0.9811677288661074"},"_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":1524646063501,"_cnpm_publish_time":1524646063501,"dist-tags":{"latest":"2.0.2"}}