Skip to content

SupportFactory Documentation Bug #488

@commonsguy

Description

@commonsguy

https://github.com/sqlcipher/android-database-sqlcipher#using-sqlcipher-for-android-with-room

The documentation here cites two constructors, and there are three:

  • SupportFactory(byte[] passphrase)
  • SupportFactory(byte[] passphrase, SQLiteDatabaseHook hook)
  • SupportFactory(byte[] passphrase, SQLiteDatabaseHook hook, boolean clearPassphrase)

Also, we probably should explain more about what clearPassphrase does. If set to true (which is the default for the other two constructors), this will zero out the bytes of the byte[] after we open the database. This is safest from a security standpoint, but it does mean that the SupportFactory instance is a single-use object. Attempting to reuse the SupportFactory instance later will result in being unable to open the database, because the passphrase will be wrong. If you think that you might need to reuse the SupportFactory instance, pass false for clearPassphrase.

If you would like me to open a PR with these fixes, just let me know what branch to base it off of, and I'll happily do it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleThis issue lacks recent activity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions