{"action":"closed","issue":{"url":"https://api.github.com/repos/crypto-browserify/createHmac/issues/3","labels_url":"https://api.github.com/repos/crypto-browserify/createHmac/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/crypto-browserify/createHmac/issues/3/comments","events_url":"https://api.github.com/repos/crypto-browserify/createHmac/issues/3/events","html_url":"https://github.com/crypto-browserify/createHmac/issues/3","id":55829198,"number":3,"title":".digest() doesn't correctly take in formatting","user":{"login":"tmcw","id":32314,"avatar_url":"https://avatars.githubusercontent.com/u/32314?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcw","html_url":"https://github.com/tmcw","followers_url":"https://api.github.com/users/tmcw/followers","following_url":"https://api.github.com/users/tmcw/following{/other_user}","gists_url":"https://api.github.com/users/tmcw/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcw/subscriptions","organizations_url":"https://api.github.com/users/tmcw/orgs","repos_url":"https://api.github.com/users/tmcw/repos","events_url":"https://api.github.com/users/tmcw/events{/privacy}","received_events_url":"https://api.github.com/users/tmcw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/crypto-browserify/createHmac/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-28T23:00:04Z","updated_at":"2015-01-29T00:49:35Z","closed_at":"2015-01-29T00:49:35Z","body":"The `.digest(encoding)` method from [node](http://nodejs.org/api/crypto.html#crypto_hmac_digest_encoding) should take a string representing an encoding of `'hex', 'binary' or 'base64'`. The `digest(encoding)` method in create-hmac takes [enc and instead treats it as a boolean](https://github.com/crypto-browserify/createHmac/blob/master/browser.js#L65), leading to output either as a buffer or as a stringified buffer that ends up being a non-ascii string.\r\n\r\nThis is a regression when the fn was split out - before it worked, because `.toString()` got the right argument: https://github.com/crypto-browserify/crypto-browserify/commit/ca6d693c6462e8e698531ccc4c2e948b8f802a11#diff-4168fbe864ac9d6edb7f0efa2b9baf22L54"}}