{"action":"created","issue":{"url":"https://api.github.com/repos/brix/crypto-js/issues/193","repository_url":"https://api.github.com/repos/brix/crypto-js","labels_url":"https://api.github.com/repos/brix/crypto-js/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/brix/crypto-js/issues/193/comments","events_url":"https://api.github.com/repos/brix/crypto-js/issues/193/events","html_url":"https://github.com/brix/crypto-js/issues/193","id":389040488,"node_id":"MDU6SXNzdWUzODkwNDA0ODg=","number":193,"title":"nodeJS encryption and CryptoJS array processing results are different","user":{"login":"317482454","id":16585053,"node_id":"MDQ6VXNlcjE2NTg1MDUz","avatar_url":"https://avatars3.githubusercontent.com/u/16585053?v=4","gravatar_id":"","url":"https://api.github.com/users/317482454","html_url":"https://github.com/317482454","followers_url":"https://api.github.com/users/317482454/followers","following_url":"https://api.github.com/users/317482454/following{/other_user}","gists_url":"https://api.github.com/users/317482454/gists{/gist_id}","starred_url":"https://api.github.com/users/317482454/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/317482454/subscriptions","organizations_url":"https://api.github.com/users/317482454/orgs","repos_url":"https://api.github.com/users/317482454/repos","events_url":"https://api.github.com/users/317482454/events{/privacy}","received_events_url":"https://api.github.com/users/317482454/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-09T16:43:08Z","updated_at":"2019-01-04T11:50:44Z","closed_at":null,"author_association":"NONE","body":"Running this code I would expect to see the node builtin and crypto-js outputting the same result, but instead they are different:\r\n\r\n```javascript\r\nconst crypto = require(\"crypto\");\r\nconst sha256 = require(\"crypto-js/sha256\");\r\nconst hex = require(\"crypto-js/enc-hex\");\r\nconst key = \"hex\";\r\nlet message = [150, 148, 161, 207, 69, 50, 198, 60, 48, 97, 136, 36, 55, 219, 126, 112, 47, 115, 133, 207, 251, 181, 42, 252, 238, 159, 117, 81, 72, 13, 235, 49]\r\nif (message instanceof Array) {\r\n    message = Buffer.from(message);\r\n}\r\nconst sig = sha256(message, key);\r\nconsole.log(\"sha256\", sig.toString(hex));\r\nconst signature =crypto.createHash('sha256')\r\n    .update(message)\r\n    .digest(\"hex\");\r\nconsole.log(\"create-sha256\", signature);\r\n\r\n```\r\n\r\n```javascript\r\nsha256 4ea5c508a6566e76240543f8feb06fd457777be39549c4016436afda65d2330e\r\ncreate-sha256 d86b87cbe795ed2bdb8f4218703337ffc1a16dba75cd498081bd9979bdad034a\r\n```"},"comment":{"url":"https://api.github.com/repos/brix/crypto-js/issues/comments/451423984","html_url":"https://github.com/brix/crypto-js/issues/193#issuecomment-451423984","issue_url":"https://api.github.com/repos/brix/crypto-js/issues/193","id":451423984,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTQyMzk4NA==","user":{"login":"317482454","id":16585053,"node_id":"MDQ6VXNlcjE2NTg1MDUz","avatar_url":"https://avatars3.githubusercontent.com/u/16585053?v=4","gravatar_id":"","url":"https://api.github.com/users/317482454","html_url":"https://github.com/317482454","followers_url":"https://api.github.com/users/317482454/followers","following_url":"https://api.github.com/users/317482454/following{/other_user}","gists_url":"https://api.github.com/users/317482454/gists{/gist_id}","starred_url":"https://api.github.com/users/317482454/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/317482454/subscriptions","organizations_url":"https://api.github.com/users/317482454/orgs","repos_url":"https://api.github.com/users/317482454/repos","events_url":"https://api.github.com/users/317482454/events{/privacy}","received_events_url":"https://api.github.com/users/317482454/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T11:50:44Z","updated_at":"2019-01-04T11:50:44Z","author_association":"NONE","body":"thank you"}}
{"actor":{"display_login":"317482454"}}