{ "id": "79953", "key": "TIMOB-5195", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2011-09-01T20:28:10.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "cb-tooling" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2016-08-19T23:32: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": "Requesting the ability to encrypt local data in an application.\r\nThe ability to programmatically encrypt a file or folder that is accessible via Filesystem in the app, including but not limited to large files such as videos etc. The ability to encrypt certain files and not others.\r\n\r\nThe encryption shall include, but not be limited to when the device is locked.\r\n\r\nIts purpose is protect against theft of digital property that is inside of or written by the app. This theft/attack can come in the form of approved tools or by accessing the filesystem of the device via unapproved methods. If a file is encrypted it shall be encrypted when accessed by any of the aforementioned means.\r\n\r\nh4. Example for testing\r\nThe example app blow is intended to be used as part of the testing to be performed when this feature is being accepted. Some changes will need to be made to the code depending on how this feature is implemented.\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'blue',\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar testFile;\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttop: 10,\r\n\theight: 100,\r\n\twidth: 300,\r\n\tbackgroundColor: \"green\",\r\n\ttext: \"Read the text file already!\"\r\n});\r\nwin.add(label);\r\n\r\nvar tfield = Ti.UI.createTextField({\r\n\ttop: 10,\r\n\theight: 40,\r\n\twidth: 200,\r\n\tborderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n\tvalue: \"text written via write()\"\r\n});\r\ntfield.addEventListener('return', function(e){\r\n\ttfield.blur();\r\n});\r\nwin.addEventListener('click', function(e){\r\n\ttfield.blur();\r\n});\r\nwin.add(tfield);\r\n\r\nvar createButton = Ti.UI.createButton({\r\n\ttop: 20,\r\n\theight: 50,\r\n\twidth: 200,\r\n\ttitle: \"Create File\"\r\n});\r\ncreateButton.addEventListener('click', function(e){\r\n\t testFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'text.txt');\r\n});\r\nwin.add(createButton);\r\n\r\nvar writeButton = Ti.UI.createButton({\r\n\ttop: 20,\r\n\theight: 50,\r\n\twidth: 200,\r\n\ttitle: \"Write File\"\r\n});\r\nwriteButton.addEventListener('click', function(e){\r\n\tTi.API.info('text.txt exists? ' + testFile.exists());\r\n\tTi.API.info('text.txt size: ' + testFile.size + ' bytes');\r\n\r\n\tif(!testFile.write(tfield.value)) {\r\n\t\tTi.API.info(\"could not write string to file.\");\r\n\t}\r\n});\r\nwin.add(writeButton);\r\n\r\nvar readButton = Ti.UI.createButton({\r\n\ttop: 20,\r\n\theight: 50,\r\n\twidth: 200,\r\n\ttitle: \"Read File\"\r\n});\r\nreadButton.addEventListener('click', function(e){\r\n\tTi.API.info('text.txt exists? ' + testFile.exists());\r\n\tTi.API.info('text.txt size: ' + testFile.size + ' bytes');\r\n\r\n\tvar text = testFile.read().text;\r\n\tTi.API.info('#### Text of testFile: ['+text+']');\r\n\tlabel.text = text;\r\n});\r\nwin.add(readButton);\r\n\r\nvar deleteButton = Ti.UI.createButton({\r\n\ttop: 20,\r\n\theight: 50,\r\n\twidth: 200,\r\n\ttitle: \"Delete File\"\r\n});\r\ndeleteButton.addEventListener('click', function(e){\r\n\ttestFile.deleteFile();\r\n});\r\nwin.add(deleteButton);\r\n\r\nwin.open();\r\n{code}\r\n\r\nh4. Associated Helpdesk Tickets\r\nhttp://appc.me/c/MUJ-49921-948\r\nhttp://appc.me/c/APP-134761 \r\n", "attachment": [], "flagged": false, "summary": "iOS: encyption of local data in an application", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.7.2\r\niOS 4.3", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }