Title: How to migrate from SafeHelperFactory to SupportOpenHelperFactory while keeping existing encrypted database accessible · Issue #66 · sqlcipher/sqlcipher-android · GitHub
Open Graph Title: How to migrate from SafeHelperFactory to SupportOpenHelperFactory while keeping existing encrypted database accessible · Issue #66 · sqlcipher/sqlcipher-android
X Title: How to migrate from SafeHelperFactory to SupportOpenHelperFactory while keeping existing encrypted database accessible · Issue #66 · sqlcipher/sqlcipher-android
Description: I’m migrating from SQLCipher’s legacy SafeHelperFactory to SupportOpenHelperFactory in the new net.zetetic:sqlcipher-android library Previously, I used: val phrase: CharArray = password.toCharArray() factory = SafeHelperFactory(phrase, S...
Open Graph Description: I’m migrating from SQLCipher’s legacy SafeHelperFactory to SupportOpenHelperFactory in the new net.zetetic:sqlcipher-android library Previously, I used: val phrase: CharArray = password.toCharArray...
X Description: I’m migrating from SQLCipher’s legacy SafeHelperFactory to SupportOpenHelperFactory in the new net.zetetic:sqlcipher-android library Previously, I used: val phrase: CharArray = password.toCharArray...
Opengraph URL: https://github.com/sqlcipher/sqlcipher-android/issues/66
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to migrate from SafeHelperFactory to SupportOpenHelperFactory while keeping existing encrypted database accessible","articleBody":"I’m migrating from SQLCipher’s legacy SafeHelperFactory to SupportOpenHelperFactory in the new net.zetetic:sqlcipher-android library\n\nPreviously, I used:\n```\nval phrase: CharArray = password.toCharArray()\nfactory = SafeHelperFactory(phrase, SafeHelperFactory.POST_KEY_SQL_MIGRATE)\n```\nNow I changed it to:\n```\nval phrase: ByteArray = password.toByteArray(Charsets.UTF_8)\nfactory = SupportOpenHelperFactory(phrase)\n```\nBut I can no longer open the database encrypted with the previous SafeHelperFactory. It throws a net.sqlcipher.database.SQLiteException: file is not a database.\n\n- The password is the same\n\n- The database file is preserved\n\n- Migration fails silently or throws an error\n\nWhat is the correct way to migrate an existing SQLCipher-encrypted Room database from SafeHelperFactory to SupportOpenHelperFactory while preserving the data.\n\nThanks.","author":{"url":"https://github.com/viethoangtien","@type":"Person","name":"viethoangtien"},"datePublished":"2025-07-15T16:30:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/66/sqlcipher-android/issues/66"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cc241a38-b7d5-6073-909d-1913ba747c2d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E92:1022EC:3210B1:42D9E7:697157A8 |
| html-safe-nonce | b7c3c74a4b42dde9f47c17666532ce5a89d514ed109d5ac49faf08d207ad8a91 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTkyOjEwMjJFQzozMjEwQjE6NDJEOUU3OjY5NzE1N0E4IiwidmlzaXRvcl9pZCI6IjMxMjYxNzQzODE0Njk5NDc4MTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e7dee556834388f2541e07b417df3339e55cbf4fc079e69598ec5e84bf1ad3ac |
| hovercard-subject-tag | issue:3232916150 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlcipher/sqlcipher-android/66/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5513ee447510fd56839a7643158f5e27b92e5757afb6490a676af4b4480e2871/sqlcipher/sqlcipher-android/issues/66 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5513ee447510fd56839a7643158f5e27b92e5757afb6490a676af4b4480e2871/sqlcipher/sqlcipher-android/issues/66 |
| og:image:alt | I’m migrating from SQLCipher’s legacy SafeHelperFactory to SupportOpenHelperFactory in the new net.zetetic:sqlcipher-android library Previously, I used: val phrase: CharArray = password.toCharArray... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | viethoangtien |
| hostname | github.com |
| expected-hostname | github.com |
| None | fd5876ec68f4a61d42f4010f6d1b2764d8ae314777de44028a7708a1d7bac1b5 |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlcipher/sqlcipher-android git https://github.com/sqlcipher/sqlcipher-android.git |
| octolytics-dimension-user_id | 649049 |
| octolytics-dimension-user_login | sqlcipher |
| octolytics-dimension-repository_id | 490856384 |
| octolytics-dimension-repository_nwo | sqlcipher/sqlcipher-android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 490856384 |
| octolytics-dimension-repository_network_root_nwo | sqlcipher/sqlcipher-android |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8f48ed2345879fb640360c3a24f1d1780c3ed3cb |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width