{"action":"created","issue":{"url":"https://api.github.com/repos/sqlcipher/sqlcipher/issues/140","labels_url":"https://api.github.com/repos/sqlcipher/sqlcipher/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/sqlcipher/sqlcipher/issues/140/comments","events_url":"https://api.github.com/repos/sqlcipher/sqlcipher/issues/140/events","html_url":"https://github.com/sqlcipher/sqlcipher/issues/140","id":113758957,"number":140,"title":"sqlite3_key not encrypting database","user":{"login":"chtombleson","id":276237,"avatar_url":"https://avatars.githubusercontent.com/u/276237?v=3","gravatar_id":"","url":"https://api.github.com/users/chtombleson","html_url":"https://github.com/chtombleson","followers_url":"https://api.github.com/users/chtombleson/followers","following_url":"https://api.github.com/users/chtombleson/following{/other_user}","gists_url":"https://api.github.com/users/chtombleson/gists{/gist_id}","starred_url":"https://api.github.com/users/chtombleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chtombleson/subscriptions","organizations_url":"https://api.github.com/users/chtombleson/orgs","repos_url":"https://api.github.com/users/chtombleson/repos","events_url":"https://api.github.com/users/chtombleson/events{/privacy}","received_events_url":"https://api.github.com/users/chtombleson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-28T07:22:28Z","updated_at":"2015-10-29T21:20:56Z","closed_at":"2015-10-29T21:03:08Z","body":"Im using the c api and calling sqlite3_key function to key & encrypt the database but if use the sqlcipher command line app the database is unencrypted. I'm not sure why.\r\n\r\n    sqlite3 *db;\r\n\r\n    int res = sqlite3_open(\"test.db\", &db);\r\n\r\n    if (res != SQLITE_OK) {\r\n        printf(\"Cannot open database\\n\");\r\n        exit(1);\r\n    }\r\n\r\n    res = sqlite3_key(db, \"testing\", 7);\r\n\r\n    if (res != SQLITE_OK) {\r\n        printf(\"Cannot key database\\n\");\r\n        exit(1);\r\n    }\r\n    \r\n    if (db != NULL) {\r\n        sqlite3_close(db);\r\n    }\r\n\r\nIf I open test.db up using the sqlcipher command line app it is not encrypted. I have a feeling I'm missing something simple here.\r\n\r\nAny help would be greatly appreciated."},"comment":{"url":"https://api.github.com/repos/sqlcipher/sqlcipher/issues/comments/152331737","html_url":"https://github.com/sqlcipher/sqlcipher/issues/140#issuecomment-152331737","issue_url":"https://api.github.com/repos/sqlcipher/sqlcipher/issues/140","id":152331737,"user":{"login":"developernotes","id":3225,"avatar_url":"https://avatars.githubusercontent.com/u/3225?v=3","gravatar_id":"","url":"https://api.github.com/users/developernotes","html_url":"https://github.com/developernotes","followers_url":"https://api.github.com/users/developernotes/followers","following_url":"https://api.github.com/users/developernotes/following{/other_user}","gists_url":"https://api.github.com/users/developernotes/gists{/gist_id}","starred_url":"https://api.github.com/users/developernotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developernotes/subscriptions","organizations_url":"https://api.github.com/users/developernotes/orgs","repos_url":"https://api.github.com/users/developernotes/repos","events_url":"https://api.github.com/users/developernotes/events{/privacy}","received_events_url":"https://api.github.com/users/developernotes/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T21:20:56Z","updated_at":"2015-10-29T21:20:56Z","body":"Glad to hear that resolved the issue - take care!"}}