{"action":"closed","issue":{"url":"https://api.github.com/repos/mash99/crypto-js/issues/84","labels_url":"https://api.github.com/repos/mash99/crypto-js/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/mash99/crypto-js/issues/84/comments","events_url":"https://api.github.com/repos/mash99/crypto-js/issues/84/events","html_url":"https://github.com/mash99/crypto-js/issues/84","id":129940893,"number":84,"title":"HmacSHA224 and HmacSHA384 give incorrect output","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mash99/crypto-js/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/mash99/crypto-js/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/mash99/crypto-js/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-30T05:04:07Z","updated_at":"2016-01-30T05:06:11Z","closed_at":"2016-01-30T05:06:11Z","body":"```\nHi,\n\nHmacSHA224 and HmacSHA384 appear to be giving incorrect hex output.\n\nHere's an example showing different output between PHP 5.4.13 and CryptoJS \nv3.1.2:\n\n// Not equal\n// 59236d2047ae349e4aaddf08f75635dc88c75272e43423659ec0791a\nhash_hmac('sha224', 'Message', 'Secret Passphrase');\n// 352ea6a011d539e468974821c3d1a77691ce562e065ec49f21055eb0 \nCryptoJS.HmacSHA224(\"Message\", \"Secret Passphrase\").toString();\n\n// Not equal\n// \n84b318cc0232a370c1f8b8746afcb575fc2debc680122c7422fd425638896d0dcf9e905b8cd9c1d7\naed8d5439a2a2328\nhash_hmac('sha384', 'Message', 'Secret Passphrase');\n// \n7fab4d58c76251997559408ccc680718ad4813d056f37c65ea7c03780b81de3086a2f61edfaa0251\n9d9916b3f4ae4a5c\nCryptoJS.HmacSHA384(\"Message\", \"Secret Passphrase\").toString();\n\n\nThe output strings are equal for the HmacSHA256 and HmacSHA512 variants:\n\n// Equal\n// 32c647602ab4c4c7543e9c50ae25e567c3354e1532b11649ce308e6e2568d205\nhash_hmac('sha256', 'Message', 'Secret Passphrase');\nCryptoJS.HmacSHA256(\"Message\", \"Secret Passphrase\").toString();\n\n// Equal\n// \nc03f82cd6f9d03920d95caeedfa722d4e42325a18b049942ee5560787ad2aa394be6b95849c563ec\ndd37495726cd6236529a721b563b9778dd6119939bcab7e1\nhash_hmac('sha512', 'Message', 'Secret Passphrase');\nCryptoJS.HmacSHA512(\"Message\", \"Secret Passphrase\").toString();\n\n\nI tested with:\nrollups/hmac-shaXXX.js\nrollups/shaXXX.js\n\nBrowsers: Chrome and Firefox\n\nI also tested the non-hmac versions of sha224, sha256, sha384, and sha512 \nbetween php (hash) and CryptoJS. There were no issues here. The strings were \nequal.\n\nI wasn't 100% sure this was a CryptoJS problem so I tested with some C# code. \nThe C# output backed up the php output. I used the built-in HMACSHA384 class \nand a 3rd-party hmac-sha224 class (http://hashlib.codeplex.com/).\n\nThanks.\n```\n\nOriginal issue reported on code.google.com by `lace...@gmail.com` on 17 Mar 2013 at 7:08"}}