mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Check TODOs
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
android:resizeableActivity="true"
|
||||
android:theme="@style/KeepassDXStyle.Night"
|
||||
tools:targetApi="n">
|
||||
<!-- TODO backup API Key -->
|
||||
<!-- TODO backup API Key #479 -->
|
||||
<meta-data
|
||||
android:name="com.google.android.backup.api_key"
|
||||
android:value="" />
|
||||
|
||||
@@ -371,7 +371,6 @@ class EntryActivity : LockingActivity() {
|
||||
taColorAccent.recycle()
|
||||
}
|
||||
val entryHistory = entry.getHistory()
|
||||
// TODO isMainEntry = not an history
|
||||
val showHistoryView = entryHistory.isNotEmpty()
|
||||
entryContentsView?.showHistory(showHistoryView)
|
||||
if (showHistoryView) {
|
||||
|
||||
@@ -843,7 +843,7 @@ class GroupActivity : LockingActivity(),
|
||||
removeChildren()
|
||||
|
||||
title = name
|
||||
this.icon = icon // TODO custom icon
|
||||
this.icon = icon // TODO custom icon #96
|
||||
}
|
||||
}
|
||||
// If group updated save it in the database
|
||||
@@ -1020,7 +1020,7 @@ class GroupActivity : LockingActivity(),
|
||||
* Keyboard Launch
|
||||
* -------------------------
|
||||
*/
|
||||
// TODO implement pre search to directly open the direct group
|
||||
// TODO implement pre search to directly open the direct group #280
|
||||
fun launchForKeyboardSelection(context: Context,
|
||||
readOnly: Boolean = PreferencesUtil.enableReadOnlyDatabase(context)) {
|
||||
checkTimeAndBuildIntent(context, null, null, readOnly) { intent ->
|
||||
|
||||
@@ -303,7 +303,7 @@ class ListNodesFragment : StylishFragment(), SortDialogFragment.SortSelectionLis
|
||||
if (readOnly
|
||||
|| isASearchResult
|
||||
|| nodes.any { it.type == Type.GROUP }) {
|
||||
// TODO COPY For Group
|
||||
// TODO Copy For Group
|
||||
menu?.removeItem(R.id.menu_copy)
|
||||
menu?.removeItem(R.id.menu_move)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import android.app.backup.SharedPreferencesBackupHelper
|
||||
@SuppressLint("NewApi")
|
||||
class SettingsBackupAgent : BackupAgentHelper() {
|
||||
|
||||
//TODO Backup
|
||||
//TODO Backup #479
|
||||
|
||||
override fun onCreate() {
|
||||
val defaultPrefs = this.packageName + "_preferences"
|
||||
|
||||
@@ -300,7 +300,6 @@ class AdvancedUnlockedManager(var context: FragmentActivity,
|
||||
|
||||
override fun handleEncryptedResult(encryptedValue: String, ivSpec: String) {
|
||||
loadDatabaseAfterRegisterCredentials.invoke(encryptedValue, ivSpec)
|
||||
// TODO setAdvancedUnlockedMessageView(R.string.encrypted_value_stored)
|
||||
}
|
||||
|
||||
override fun handleDecryptedResult(decryptedValue: String) {
|
||||
|
||||
@@ -60,7 +60,7 @@ class BiometricUnlockDatabaseHelper(private val context: FragmentActivity) {
|
||||
setTitle(context.getString(R.string.biometric_prompt_store_credential_title))
|
||||
setDescription(context.getString(R.string.biometric_prompt_store_credential_message))
|
||||
setConfirmationRequired(true)
|
||||
// TODO device credential
|
||||
// TODO device credential #102 #152
|
||||
/*
|
||||
if (keyguardManager?.isDeviceSecure == true)
|
||||
setDeviceCredentialAllowed(true)
|
||||
@@ -73,7 +73,7 @@ class BiometricUnlockDatabaseHelper(private val context: FragmentActivity) {
|
||||
setTitle(context.getString(R.string.biometric_prompt_extract_credential_title))
|
||||
//setDescription(context.getString(R.string.biometric_prompt_extract_credential_message))
|
||||
setConfirmationRequired(false)
|
||||
// TODO device credential
|
||||
// TODO device credential #102 #152
|
||||
/*
|
||||
if (keyguardManager?.isDeviceSecure == true)
|
||||
setDeviceCredentialAllowed(true)
|
||||
|
||||
@@ -108,7 +108,7 @@ class Argon2Kdf internal constructor() : KdfEngine() {
|
||||
get() = MAX_MEMORY
|
||||
|
||||
override fun getParallelism(p: KdfParameters): Int {
|
||||
return p.getUInt32(PARAM_PARALLELISM).toInt() // TODO Verify
|
||||
return p.getUInt32(PARAM_PARALLELISM).toInt() // TODO Verify #443
|
||||
}
|
||||
|
||||
override fun setParallelism(p: KdfParameters, parallelism: Int) {
|
||||
|
||||
@@ -77,7 +77,7 @@ class DatabaseKDBX : DatabaseVersioned<UUID, UUID, GroupKDBX, EntryKDBX> {
|
||||
var defaultUserName = ""
|
||||
var defaultUserNameChanged = DateInstant()
|
||||
|
||||
// TODO date
|
||||
// TODO last change date
|
||||
var keyLastChanged = DateInstant()
|
||||
var keyChangeRecDays: Long = -1
|
||||
var keyChangeForceDays: Long = 1
|
||||
|
||||
@@ -104,10 +104,7 @@ abstract class DatabaseVersioned<
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
protected fun getPasswordKey(key: String?): ByteArray {
|
||||
if (key == null)
|
||||
throw IllegalArgumentException("Key cannot be empty.") // TODO
|
||||
|
||||
protected fun getPasswordKey(key: String): ByteArray {
|
||||
val messageDigest: MessageDigest
|
||||
try {
|
||||
messageDigest = MessageDigest.getInstance("SHA-256")
|
||||
|
||||
@@ -158,8 +158,7 @@ class FieldReferencesEngine {
|
||||
}
|
||||
|
||||
val list = ArrayList<EntryKDBX>()
|
||||
// TODO type parameter
|
||||
searchEntries(contextV4.databaseV4!!.rootGroup, searchParametersV4, list)
|
||||
searchEntries(contextV4.databaseV4?.rootGroup, searchParametersV4, list)
|
||||
|
||||
return if (list.size > 0) {
|
||||
TargetResult(list[0], wanted)
|
||||
|
||||
@@ -79,7 +79,7 @@ class GroupKDBX : GroupVersioned<UUID, UUID, GroupKDBX, EntryKDBX>, NodeKDBXInte
|
||||
iconCustom = parcel.readParcelable(IconImageCustom::class.java.classLoader) ?: iconCustom
|
||||
usageCount = parcel.readLong()
|
||||
locationChanged = parcel.readParcelable(DateInstant::class.java.classLoader) ?: locationChanged
|
||||
// TODO customData = ParcelableUtil.readStringParcelableMap(in);
|
||||
// TODO customData = ParcelableUtil.readStringParcelableMap(parcel);
|
||||
notes = parcel.readString() ?: notes
|
||||
isExpanded = parcel.readByte().toInt() != 0
|
||||
defaultAutoTypeSequence = parcel.readString() ?: defaultAutoTypeSequence
|
||||
|
||||
@@ -49,7 +49,7 @@ class IconImageCustom : IconImage {
|
||||
constructor(parcel: Parcel) {
|
||||
uuid = parcel.readSerializable() as UUID
|
||||
// TODO Take too much memories
|
||||
// in.readByteArray(imageData);
|
||||
// parcel.readByteArray(imageData);
|
||||
}
|
||||
|
||||
override fun writeToParcel(dest: Parcel, flags: Int) {
|
||||
|
||||
@@ -69,7 +69,7 @@ class DatabaseHeaderKDB : DatabaseHeader() {
|
||||
transformSeed = inputStream.readBytesLength(32) // 32 bytes
|
||||
numKeyEncRounds = inputStream.readBytes4ToInt()
|
||||
if (numKeyEncRounds < 0) {
|
||||
// TODO: Really treat this like an unsigned integer
|
||||
// TODO: Really treat this like an unsigned integer #443
|
||||
throw IOException("Does not support more than " + Integer.MAX_VALUE + " rounds.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,26 +150,6 @@ class DatabaseInputKDB(cacheDirectory: File,
|
||||
)
|
||||
)
|
||||
|
||||
/* TODO checksum
|
||||
// Add a mark to the content start
|
||||
if (!cipherInputStream.markSupported()) {
|
||||
throw IOException("Input stream does not support mark.")
|
||||
}
|
||||
cipherInputStream.mark(cipherInputStream.available() +1)
|
||||
// Consume all data to get the digest
|
||||
var numberRead = 0
|
||||
while (numberRead > -1) {
|
||||
numberRead = cipherInputStream.read(ByteArray(1024))
|
||||
}
|
||||
|
||||
// Check sum
|
||||
if (!Arrays.equals(messageDigest.digest(), header.contentsHash)) {
|
||||
throw InvalidCredentialsDatabaseException()
|
||||
}
|
||||
// Back to the content start
|
||||
cipherInputStream.reset()
|
||||
*/
|
||||
|
||||
// New manual root because KDB contains multiple root groups (here available with getRootGroups())
|
||||
val newRoot = mDatabaseToOpen.createGroup()
|
||||
newRoot.level = -1
|
||||
|
||||
@@ -128,7 +128,7 @@ class DatabaseOutputKDB(private val mDatabaseKDB: DatabaseKDB,
|
||||
header.version = DatabaseHeaderKDB.DBVER_DW
|
||||
header.numGroups = mDatabaseKDB.numberOfGroups()
|
||||
header.numEntries = mDatabaseKDB.numberOfEntries()
|
||||
header.numKeyEncRounds = mDatabaseKDB.numberKeyEncryptionRounds.toInt() // TODO Signed Long - Unsigned Int
|
||||
header.numKeyEncRounds = mDatabaseKDB.numberKeyEncryptionRounds.toInt() // TODO Signed Long - Unsigned Int #443
|
||||
|
||||
setIVs(header)
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class EntryOutputKDB
|
||||
val binaryDataLengthRightSize = if (binaryDataLength <= Int.MAX_VALUE) {
|
||||
binaryDataLength.toInt()
|
||||
} else {
|
||||
0 // TODO if length > UInt.maxvalue show exception
|
||||
0 // TODO if length > UInt.maxvalue show exception #443
|
||||
}
|
||||
// Write data length
|
||||
mOutputStream.write(intTo4Bytes(binaryDataLengthRightSize))
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.io.OutputStream
|
||||
class LittleEndianDataOutputStream(private val baseStream: OutputStream) : OutputStream() {
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun writeUInt(uint: Long) { // TODO UInt
|
||||
fun writeUInt(uint: Long) { // TODO UInt #443
|
||||
baseStream.write(intTo4Bytes(uint.toInt()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user