SecurityHelperImpl
internal class SecurityHelperImpl(passphraseStorage: PassphraseStorage, databaseMigrator: DatabaseMigrator = ::migrateDatabaseKey, isSqlCipherSaltStored: Boolean = false) : SecurityHelper
Parameters
isSqlCipherSaltStored
whether the global and user databases need their SQLCipher salt stored, because SQLCipher can't keep it in their header. On iOS, where that header stays readable. Their secret, under the same alias, is then 48 random bytes instead of 32: the key followed by its 16-byte salt, so the two can't go missing apart. The salt isn't secret, and rotating the key has to keep it.
Constructors
Link copied to clipboard
constructor(passphraseStorage: PassphraseStorage, databaseMigrator: DatabaseMigrator = ::migrateDatabaseKey, isSqlCipherSaltStored: Boolean = false)
Functions
Link copied to clipboard
Link copied to clipboard
The raw key is generated and stored before it is ever used, so a crash between storing it and rekeying the database only costs an unused alias. The reverse order would lose the database.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard