{"action":"created","issue":{"url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/52","labels_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/52/comments","events_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/52/events","html_url":"https://github.com/barrysteyn/node-scrypt/issues/52","id":44909712,"number":52,"title":"Asynchronous verify throws instead of returning err object","user":{"login":"rus0000","id":5832730,"avatar_url":"https://avatars.githubusercontent.com/u/5832730?v=3","gravatar_id":"","url":"https://api.github.com/users/rus0000","html_url":"https://github.com/rus0000","followers_url":"https://api.github.com/users/rus0000/followers","following_url":"https://api.github.com/users/rus0000/following{/other_user}","gists_url":"https://api.github.com/users/rus0000/gists{/gist_id}","starred_url":"https://api.github.com/users/rus0000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rus0000/subscriptions","organizations_url":"https://api.github.com/users/rus0000/orgs","repos_url":"https://api.github.com/users/rus0000/repos","events_url":"https://api.github.com/users/rus0000/events{/privacy}","received_events_url":"https://api.github.com/users/rus0000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-10-05T09:28:52Z","updated_at":"2015-03-16T17:16:56Z","closed_at":"2015-03-16T17:16:56Z","body":"```javascript\r\nvar scrypt = require(\"scrypt\");\r\nvar scryptParameters = scrypt.params(0.1);\r\nscrypt.hash.config.outputEncoding = \"base64\";\r\nscrypt.verify.config.hashEncoding = \"buffer\"; //will cause error\r\n\r\nvar hash = scrypt.hash(\"password\", scryptParameters);\r\n\r\n//Verify expects that hash would be a buffer\r\n//Now it throws with wrong hash format message, instead of returning err object\r\nscrypt.verify(hash, \"password\", function(err, result) {\r\n    //Expecting err object here\r\n}); //Throws with: 'Module addon argument error: key must be a buffer as specified by config'\r\n```\r\nVerify should throw only if there is no callback argument passed to it"},"comment":{"url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/comments/81816944","html_url":"https://github.com/barrysteyn/node-scrypt/issues/52#issuecomment-81816944","issue_url":"https://api.github.com/repos/barrysteyn/node-scrypt/issues/52","id":81816944,"user":{"login":"barrysteyn","id":1537348,"avatar_url":"https://avatars.githubusercontent.com/u/1537348?v=3","gravatar_id":"","url":"https://api.github.com/users/barrysteyn","html_url":"https://github.com/barrysteyn","followers_url":"https://api.github.com/users/barrysteyn/followers","following_url":"https://api.github.com/users/barrysteyn/following{/other_user}","gists_url":"https://api.github.com/users/barrysteyn/gists{/gist_id}","starred_url":"https://api.github.com/users/barrysteyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrysteyn/subscriptions","organizations_url":"https://api.github.com/users/barrysteyn/orgs","repos_url":"https://api.github.com/users/barrysteyn/repos","events_url":"https://api.github.com/users/barrysteyn/events{/privacy}","received_events_url":"https://api.github.com/users/barrysteyn/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T17:16:56Z","updated_at":"2015-03-16T17:16:56Z","body":"To note, that this is not an issue. This is being thrown because it is deemed a programmer error. This has been documented and in 29dabe135c2423f3a173aebc6d7e2deaf8d145db"}}