{ "id": "97707", "key": "TIMOB-10369", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2012-07-20T04:57:50.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core", "supportTeam" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "19791", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "98941", "key": "TIMOB-10370", "fields": { "summary": "Android: md5HexDigest hashing behaviour is inconsistent with other systems", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:04:24.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h3. Problem description\r\nCreating an md5sum of a text-like file that does not conform exactly to UTF-8 produces a different hash from mac or linux systems, reducing its use as file validation.\r\n\r\nh3. Steps to reproduce\r\nMac and Ubuntu systems both give the following MD5 sum for the attached file:\r\nMD5 (init5.js) = 693e9af84d3dfcc71e640e005bdc5e2e\r\n\r\nusing the following titanium code:\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n});\r\n\r\nwin.addEventListener('click', function() {\r\n\tvar file = Titanium.Filesystem.getFile(\"init5.js\");\r\n\tvar blob = file.read();\r\n\tvar md5sum = Titanium.Utils.md5HexDigest(blob);\r\n\tTi.API.info(\"md5 is \" + md5sum);\r\n\talert(md5sum);\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nproduces a different MD5 output (on both Android and iOS) = d41d8cd98f00b204e9800998ecf8427e , different from the one generated from Mac OS X or Ubuntu Linux", "attachment": [ { "id": "30397", "filename": "init5.js", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-09T09:24:55.000+0000", "size": 3, "mimeType": "text/javascript" }, { "id": "29926", "filename": "init5.js", "author": { "name": "jturnbull", "key": "jturnbull", "displayName": "James Turnbull", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T04:57:50.000+0000", "size": 3, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: md5HexDigest hashing behaviour is inconsistent with other systems", "creator": { "name": "jturnbull", "key": "jturnbull", "displayName": "James Turnbull", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK version: 2.1.1 GA\r\nPlatform & version: iOS 4.0 - 5.1\r\nDevice Details: iOS simulator, iPad\r\nDesktop OS: Mac OS X Lion and Ubuntu Linux", "comment": { "comments": [ { "id": "228153", "author": { "name": "jturnbull", "key": "jturnbull", "displayName": "James Turnbull", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When I initially reported this issue I suggested an easy fix.\r\n\r\nIs there an expected version of the SDK that will include this easy fix?", "updateAuthor": { "name": "jturnbull", "key": "jturnbull", "displayName": "James Turnbull", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-21T09:23:53.000+0000", "updated": "2012-11-21T09:23:53.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }