{"issue":{"created_at":"2011-11-30T03:01:09Z","state":"closed","updated_at":"2011-11-30T13:30:08Z","comments":1,"user":{"gravatar_id":"f0deca4576206207a882928e7ff32ddb","id":43438,"url":"https://api.github.com/users/secoif","avatar_url":"https://secure.gravatar.com/avatar/f0deca4576206207a882928e7ff32ddb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"secoif"},"body":"Currently there appears to be no way to determine if the crypto `createHash` function succeeded. If you're in the repl, `createHash` calmly prints a little \"node-crypto : Unknown message digest \" message,  but outside the repl, the first time you hear anything about there being a  problem, is when you try to `update` the hash:\r\n\r\n```javascript\r\n// repl will print \"node-crypto : Unknown message digest md1\" but not throw\r\n// and i can't see any difference with the returned object between valid/invalid requests\r\nvar shasum = require('crypto').createHash('invalid method')\r\nshasum.update('someDatas') // will throw TypeError: HashUpdate fail\r\n\r\n```\r\n\r\n`createHash` should probably throw or simply return something falsy.\r\n\r\n\r\n","assignee":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2396844,"number":2227,"labels":[{"name":"crypto","color":"e10c02","url":"https://api.github.com/repos/joyent/node/labels/crypto"}],"title":"crypto.createHash only mildly annoyed by invalid digest methods","html_url":"https://github.com/joyent/node/issues/2227","closed_at":"2011-11-30T13:28:25Z","url":"https://api.github.com/repos/joyent/node/issues/2227","milestone":null},"action":"created","comment":{"created_at":"2011-11-30T13:30:08Z","updated_at":"2011-11-30T13:30:08Z","user":{"gravatar_id":"3d43d9038ab645ecb2e3a1df2951d30a","id":275871,"url":"https://api.github.com/users/bnoordhuis","avatar_url":"https://secure.gravatar.com/avatar/3d43d9038ab645ecb2e3a1df2951d30a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"bnoordhuis"},"body":"Thanks for the report, it's fixed in f44d0b9. It's an API change so this feature won't land in a stable branch until 0.8.","id":2959649,"url":"https://api.github.com/repos/joyent/node/issues/comments/2959649"}}