From 87f69bb7e251aaa44f02fae1b9e3c7fdecc46f65 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Sun, 27 Mar 2022 18:56:12 +0200 Subject: [PATCH] Entropy #869 --- CHANGELOG | 2 +- .../dialogs/GeneratePasswordDialogFragment.kt | 69 ++------- .../SetMainCredentialDialogFragment.kt | 33 ++--- .../keepass/utils/PasswordEntropy.kt | 14 +- .../keepass/view/MainCredentialView.kt | 26 ++-- .../kunzisoft/keepass/view/PasswordView.kt | 134 ++++++++++++++++++ .../res/layout/fragment_generate_password.xml | 29 +--- .../layout/fragment_set_main_credential.xml | 33 +---- .../main/res/layout/view_main_credentials.xml | 5 +- app/src/main/res/layout/view_password.xml | 49 +++++++ app/src/main/res/values/strings.xml | 1 + .../metadata/android/en-US/changelogs/106.txt | 2 +- .../metadata/android/fr-FR/changelogs/106.txt | 2 +- 13 files changed, 236 insertions(+), 163 deletions(-) create mode 100644 app/src/main/java/com/kunzisoft/keepass/view/PasswordView.kt create mode 100644 app/src/main/res/layout/view_password.xml diff --git a/CHANGELOG b/CHANGELOG index e8c96e70f..09250e4df 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,5 @@ KeePassDX(3.4.0) - * Show visual password strength indicator #631 + * Show visual password strength indicator with entropy #631 #869 KeePassDX(3.3.3) * Fix shared otpauth link if database not open #1274 diff --git a/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/GeneratePasswordDialogFragment.kt b/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/GeneratePasswordDialogFragment.kt index 6069b3f15..8e5107660 100644 --- a/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/GeneratePasswordDialogFragment.kt +++ b/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/GeneratePasswordDialogFragment.kt @@ -22,33 +22,25 @@ package com.kunzisoft.keepass.activities.dialogs import android.app.Dialog import android.content.Context import android.os.Bundle -import android.text.Editable -import android.text.TextWatcher import android.view.View import android.widget.* import androidx.appcompat.app.AlertDialog -import com.google.android.material.progressindicator.LinearProgressIndicator -import com.google.android.material.textfield.TextInputLayout import com.kunzisoft.keepass.R import com.kunzisoft.keepass.database.element.Field import com.kunzisoft.keepass.password.PasswordGenerator import com.kunzisoft.keepass.settings.PreferencesUtil import com.kunzisoft.keepass.timeout.ClipboardHelper -import com.kunzisoft.keepass.utils.PasswordEntropy -import com.kunzisoft.keepass.view.applyFontVisibility +import com.kunzisoft.keepass.view.PasswordView class GeneratePasswordDialogFragment : DatabaseDialogFragment() { private var mListener: GeneratePasswordListener? = null private var root: View? = null - private var passwordStrengthProgress: LinearProgressIndicator? = null private var lengthTextView: EditText? = null - private var passwordInputLayoutView: TextInputLayout? = null - private var passwordView: EditText? = null + private var passwordView: PasswordView? = null private var mPasswordField: Field? = null - private var mPasswordEntropyCalculator: PasswordEntropy? = null private var uppercaseBox: CompoundButton? = null private var lowercaseBox: CompoundButton? = null @@ -75,48 +67,22 @@ class GeneratePasswordDialogFragment : DatabaseDialogFragment() { super.onDetach() } - override fun onResume() { - super.onResume() - - // To check checkboxes if a text is present - passwordView?.addTextChangedListener(passwordTextWatcher) - } - - override fun onPause() { - super.onPause() - - passwordView?.removeTextChangedListener(passwordTextWatcher) - } - - private val passwordTextWatcher = object : TextWatcher { - override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {} - - override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {} - - override fun afterTextChanged(editable: Editable) { - getEntropyStrength(editable.toString()) - } - } - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { activity?.let { activity -> val builder = AlertDialog.Builder(activity) val inflater = activity.layoutInflater root = inflater.inflate(R.layout.fragment_generate_password, null) - passwordInputLayoutView = root?.findViewById(R.id.password_input_layout) - passwordView = root?.findViewById(R.id.password) - passwordView?.applyFontVisibility() + passwordView = root?.findViewById(R.id.password_view) val passwordCopyView: ImageView? = root?.findViewById(R.id.password_copy_button) passwordCopyView?.visibility = if(PreferencesUtil.allowCopyProtectedFields(activity)) View.VISIBLE else View.GONE val clipboardHelper = ClipboardHelper(activity) passwordCopyView?.setOnClickListener { - clipboardHelper.timeoutCopyToClipboard(passwordView!!.text.toString(), + clipboardHelper.timeoutCopyToClipboard(passwordView!!.passwordString, getString(R.string.copy_field, getString(R.string.entry_password))) } - passwordStrengthProgress = root?.findViewById(R.id.password_strength_progress) lengthTextView = root?.findViewById(R.id.length) uppercaseBox = root?.findViewById(R.id.cb_uppercase) @@ -130,11 +96,6 @@ class GeneratePasswordDialogFragment : DatabaseDialogFragment() { extendedBox = root?.findViewById(R.id.cb_extended) mPasswordField = arguments?.getParcelable(KEY_PASSWORD_FIELD) - mPasswordEntropyCalculator = PasswordEntropy { - passwordView?.text?.toString()?.let { firstPassword -> - getEntropyStrength(firstPassword) - } - } assignDefaultCharacters() @@ -159,7 +120,7 @@ class GeneratePasswordDialogFragment : DatabaseDialogFragment() { builder.setView(root) .setPositiveButton(R.string.accept) { _, _ -> mPasswordField?.let { passwordField -> - passwordView?.text?.toString()?.let { passwordValue -> + passwordView?.passwordString?.let { passwordValue -> passwordField.protectedValue.stringValue = passwordValue } mListener?.acceptPassword(passwordField) @@ -181,17 +142,6 @@ class GeneratePasswordDialogFragment : DatabaseDialogFragment() { return super.onCreateDialog(savedInstanceState) } - private fun getEntropyStrength(passwordText: String) { - mPasswordEntropyCalculator?.getEntropyStrength(passwordText) { entropyStrength -> - passwordStrengthProgress?.apply { - post { - setIndicatorColor(entropyStrength.strength.color) - setProgressCompat(entropyStrength.estimationPercent, true) - } - } - } - } - private fun assignDefaultCharacters() { uppercaseBox?.isChecked = false lowercaseBox?.isChecked = false @@ -224,8 +174,7 @@ class GeneratePasswordDialogFragment : DatabaseDialogFragment() { private fun fillPassword() { val passwordGenerated = generatePassword() - root?.findViewById(R.id.password)?.setText(passwordGenerated) - getEntropyStrength(passwordGenerated) + passwordView?.passwordString = passwordGenerated } private fun generatePassword(): String { @@ -242,11 +191,11 @@ class GeneratePasswordDialogFragment : DatabaseDialogFragment() { specialsBox?.isChecked == true, bracketsBox?.isChecked == true, extendedBox?.isChecked == true) - passwordInputLayoutView?.error = null + passwordView?.error = null } catch (e: NumberFormatException) { - passwordInputLayoutView?.error = getString(R.string.error_wrong_length) + passwordView?.error = getString(R.string.error_wrong_length) } catch (e: IllegalArgumentException) { - passwordInputLayoutView?.error = e.message + passwordView?.error = e.message } return password diff --git a/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/SetMainCredentialDialogFragment.kt b/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/SetMainCredentialDialogFragment.kt index 7883bb64d..c37a08422 100644 --- a/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/SetMainCredentialDialogFragment.kt +++ b/app/src/main/java/com/kunzisoft/keepass/activities/dialogs/SetMainCredentialDialogFragment.kt @@ -27,12 +27,10 @@ import android.os.Bundle import android.text.Editable import android.text.SpannableStringBuilder import android.text.TextWatcher -import android.util.Log import android.view.View import android.widget.CompoundButton import android.widget.TextView import androidx.appcompat.app.AlertDialog -import com.google.android.material.progressindicator.LinearProgressIndicator import com.google.android.material.textfield.TextInputLayout import com.kunzisoft.keepass.R import com.kunzisoft.keepass.activities.helpers.ExternalFileHelper @@ -41,6 +39,8 @@ import com.kunzisoft.keepass.model.MainCredential import com.kunzisoft.keepass.utils.PasswordEntropy import com.kunzisoft.keepass.utils.UriUtil import com.kunzisoft.keepass.view.KeyFileSelectionView +import com.kunzisoft.keepass.view.PasswordView +import com.kunzisoft.keepass.view.applyFontVisibility class SetMainCredentialDialogFragment : DatabaseDialogFragment() { @@ -51,9 +51,7 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() { private var passwordCheckBox: CompoundButton? = null - private var passwordTextInputLayout: TextInputLayout? = null - private var passwordView: TextView? = null - private var passwordStrengthView: LinearProgressIndicator? = null + private var passwordView: PasswordView? = null private var passwordRepeatTextInputLayout: TextInputLayout? = null private var passwordRepeatView: TextView? = null @@ -76,15 +74,6 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() { override fun afterTextChanged(editable: Editable) { passwordCheckBox?.isChecked = true - // Define password strength - mPasswordEntropyCalculator?.getEntropyStrength(editable.toString()) { entropyStrength -> - passwordStrengthView?.apply { - post { - setIndicatorColor(entropyStrength.strength.color) - setProgressCompat(entropyStrength.estimationPercent, true) - } - } - } } } @@ -144,16 +133,10 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() { } passwordCheckBox = rootView?.findViewById(R.id.password_checkbox) - passwordTextInputLayout = rootView?.findViewById(R.id.password_input_layout) - passwordView = rootView?.findViewById(R.id.pass_password) - passwordStrengthView = rootView?.findViewById(R.id.password_strength_progress) - passwordStrengthView?.apply { - setIndicatorColor(PasswordEntropy.Strength.RISKY.color) - progress = 0 - max = 100 - } + passwordView = rootView?.findViewById(R.id.password_view) passwordRepeatTextInputLayout = rootView?.findViewById(R.id.password_repeat_input_layout) - passwordRepeatView = rootView?.findViewById(R.id.pass_conf_password) + passwordRepeatView = rootView?.findViewById(R.id.password_confirmation) + passwordRepeatView?.applyFontVisibility() keyFileCheckBox = rootView?.findViewById(R.id.keyfile_checkox) keyFileSelectionView = rootView?.findViewById(R.id.keyfile_selection) @@ -189,7 +172,7 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() { if (allowNoMasterKey) showNoKeyConfirmationDialog() else { - passwordTextInputLayout?.error = getString(R.string.error_disallow_no_credentials) + passwordView?.error = getString(R.string.error_disallow_no_credentials) } } if (!error) { @@ -236,7 +219,7 @@ class SetMainCredentialDialogFragment : DatabaseDialogFragment() { && passwordCheckBox!!.isChecked && passwordView != null && passwordRepeatView != null) { - mMasterPassword = passwordView!!.text.toString() + mMasterPassword = passwordView!!.passwordString val confPassword = passwordRepeatView!!.text.toString() // Verify that passwords match diff --git a/app/src/main/java/com/kunzisoft/keepass/utils/PasswordEntropy.kt b/app/src/main/java/com/kunzisoft/keepass/utils/PasswordEntropy.kt index ac53eea09..08c3d4ca9 100644 --- a/app/src/main/java/com/kunzisoft/keepass/utils/PasswordEntropy.kt +++ b/app/src/main/java/com/kunzisoft/keepass/utils/PasswordEntropy.kt @@ -25,7 +25,6 @@ import me.gosimple.nbvcxz.Nbvcxz import me.gosimple.nbvcxz.resources.Configuration import me.gosimple.nbvcxz.resources.ConfigurationBuilder import java.util.* -import kotlin.math.ln import kotlin.math.min class PasswordEntropy(actionOnInitFinished: (() -> Unit)? = null) { @@ -54,16 +53,19 @@ class PasswordEntropy(actionOnInitFinished: (() -> Unit)? = null) { } data class EntropyStrength(val strength: Strength, + val entropy: Double, val estimationPercent: Int) { override fun toString(): String { - return "EntropyStrength(strength=$strength, estimationPercent=$estimationPercent)" + return "EntropyStrength(strength=$strength, entropy=$entropy, estimationPercent=$estimationPercent)" } } fun getEntropyStrength(passwordString: String, entropyStrengthResult: (EntropyStrength) -> Unit) { - val basicScore = mPasswordEntropyCalculator?.estimate(passwordString)?.basicScore ?: 0 - val percentScore = min(((ln((basicScore+2.0)) *passwordString.length)*100/60).toInt(), 100) + val estimate = mPasswordEntropyCalculator?.estimate(passwordString) + val basicScore = estimate?.basicScore ?: 0 + val entropy = estimate?.entropy ?: 0.0 + val percentScore = min(entropy*100/200, 100.0).toInt() val strength = if (basicScore == 0 || percentScore < 10) { Strength.RISKY @@ -71,7 +73,7 @@ class PasswordEntropy(actionOnInitFinished: (() -> Unit)? = null) { Strength.VERY_GUESSABLE } else if (basicScore == 2 || percentScore < 33) { Strength.SOMEWHAT_GUESSABLE - } else if (basicScore == 3 || percentScore < 52) { + } else if (basicScore == 3 || percentScore < 50) { Strength.SAFELY_UNGUESSABLE } else if (basicScore == 4) { Strength.VERY_UNGUESSABLE @@ -80,7 +82,7 @@ class PasswordEntropy(actionOnInitFinished: (() -> Unit)? = null) { } IOActionTask( { - EntropyStrength(strength, percentScore) + EntropyStrength(strength, entropy, percentScore) }, { it?.let { entropyStrength -> entropyStrengthResult.invoke(entropyStrength) } diff --git a/app/src/main/java/com/kunzisoft/keepass/view/MainCredentialView.kt b/app/src/main/java/com/kunzisoft/keepass/view/MainCredentialView.kt index 41f701fd9..75ba32eb4 100644 --- a/app/src/main/java/com/kunzisoft/keepass/view/MainCredentialView.kt +++ b/app/src/main/java/com/kunzisoft/keepass/view/MainCredentialView.kt @@ -46,7 +46,7 @@ class MainCredentialView @JvmOverloads constructor(context: Context, defStyle: Int = 0) : FrameLayout(context, attrs, defStyle) { - private var passwordView: EditText + private var passwordTextView: EditText private var keyFileSelectionView: KeyFileSelectionView private var checkboxPasswordView: CompoundButton private var checkboxKeyFileView: CompoundButton @@ -60,7 +60,7 @@ class MainCredentialView @JvmOverloads constructor(context: Context, val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater? inflater?.inflate(R.layout.view_main_credentials, this) - passwordView = findViewById(R.id.password) + passwordTextView = findViewById(R.id.password_text_view) keyFileSelectionView = findViewById(R.id.keyfile_selection) checkboxPasswordView = findViewById(R.id.password_checkbox) checkboxKeyFileView = findViewById(R.id.keyfile_checkox) @@ -75,8 +75,8 @@ class MainCredentialView @JvmOverloads constructor(context: Context, } } - passwordView.setOnEditorActionListener(onEditorActionListener) - passwordView.addTextChangedListener(object : TextWatcher { + passwordTextView.setOnEditorActionListener(onEditorActionListener) + passwordTextView.addTextChangedListener(object : TextWatcher { override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {} override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {} @@ -86,7 +86,7 @@ class MainCredentialView @JvmOverloads constructor(context: Context, checkboxPasswordView.isChecked = true } }) - passwordView.setOnKeyListener { _, _, keyEvent -> + passwordTextView.setOnKeyListener { _, _, keyEvent -> var handled = false if (keyEvent.action == KeyEvent.ACTION_DOWN && keyEvent?.keyCode == KeyEvent.KEYCODE_ENTER @@ -108,11 +108,11 @@ class MainCredentialView @JvmOverloads constructor(context: Context, fun populatePasswordTextView(text: String?) { if (text == null || text.isEmpty()) { - passwordView.setText("") + passwordTextView.setText("") if (checkboxPasswordView.isChecked) checkboxPasswordView.isChecked = false } else { - passwordView.setText(text) + passwordTextView.setText(text) if (checkboxPasswordView.isChecked) checkboxPasswordView.isChecked = true } @@ -137,7 +137,7 @@ class MainCredentialView @JvmOverloads constructor(context: Context, fun getMainCredential(): MainCredential { return MainCredential().apply { this.masterPassword = if (checkboxPasswordView.isChecked) - passwordView.text?.toString() else null + passwordTextView.text?.toString() else null this.keyFileUri = if (checkboxKeyFileView.isChecked) keyFileSelectionView.uri else null } @@ -163,7 +163,7 @@ class MainCredentialView @JvmOverloads constructor(context: Context, */ fun retrieveCredentialForStorage(listener: CredentialStorageListener): ByteArray? { return when (mCredentialStorage) { - CredentialStorage.PASSWORD -> listener.passwordToStore(passwordView.text?.toString()) + CredentialStorage.PASSWORD -> listener.passwordToStore(passwordTextView.text?.toString()) CredentialStorage.KEY_FILE -> listener.keyfileToStore(keyFileSelectionView.uri) CredentialStorage.HARDWARE_KEY -> listener.hardwareKeyToStore() } @@ -176,15 +176,15 @@ class MainCredentialView @JvmOverloads constructor(context: Context, } fun requestPasswordFocus() { - passwordView.requestFocusFromTouch() + passwordTextView.requestFocusFromTouch() } // Auto select the password field and open keyboard fun focusPasswordFieldAndOpenKeyboard() { - passwordView.postDelayed({ - passwordView.requestFocusFromTouch() + passwordTextView.postDelayed({ + passwordTextView.requestFocusFromTouch() val inputMethodManager = context.getSystemService(AppCompatActivity.INPUT_METHOD_SERVICE) as? InputMethodManager? - inputMethodManager?.showSoftInput(passwordView, InputMethodManager.SHOW_IMPLICIT) + inputMethodManager?.showSoftInput(passwordTextView, InputMethodManager.SHOW_IMPLICIT) }, 100) } diff --git a/app/src/main/java/com/kunzisoft/keepass/view/PasswordView.kt b/app/src/main/java/com/kunzisoft/keepass/view/PasswordView.kt new file mode 100644 index 000000000..86f38e472 --- /dev/null +++ b/app/src/main/java/com/kunzisoft/keepass/view/PasswordView.kt @@ -0,0 +1,134 @@ +/* + * Copyright 2022 Jeremy Jamet / Kunzisoft. + * + * This file is part of KeePassDX. + * + * KeePassDX is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * KeePassDX is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with KeePassDX. If not, see . + * + */ +package com.kunzisoft.keepass.view + +import android.content.Context +import android.text.Editable +import android.text.TextWatcher +import android.util.AttributeSet +import android.view.LayoutInflater +import android.widget.FrameLayout +import android.widget.TextView +import com.google.android.material.progressindicator.LinearProgressIndicator +import com.google.android.material.textfield.TextInputLayout +import com.kunzisoft.keepass.R +import com.kunzisoft.keepass.utils.PasswordEntropy + +class PasswordView @JvmOverloads constructor(context: Context, + attrs: AttributeSet? = null, + defStyle: Int = 0) + : FrameLayout(context, attrs, defStyle) { + + private var mPasswordEntropyCalculator: PasswordEntropy? = null + + private val passwordInputLayout: TextInputLayout + private val passwordText: TextView + private val passwordStrengthProgress: LinearProgressIndicator + private val passwordEntropy: TextView + + private var mPasswordTextWatcher: MutableList = mutableListOf() + private val passwordTextWatcher = object : TextWatcher { + override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) { + mPasswordTextWatcher.forEach { + it.beforeTextChanged(charSequence, i, i1, i2) + } + } + + override fun onTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) { + mPasswordTextWatcher.forEach { + it.onTextChanged(charSequence, i, i1, i2) + } + } + + override fun afterTextChanged(editable: Editable) { + mPasswordTextWatcher.forEach { + it.afterTextChanged(editable) + } + getEntropyStrength(editable.toString()) + } + } + + + init { + val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater? + inflater?.inflate(R.layout.view_password, this) + + passwordInputLayout = findViewById(R.id.password_input_layout) + passwordText = findViewById(R.id.password_text) + passwordText?.applyFontVisibility() + passwordText.addTextChangedListener(passwordTextWatcher) + passwordStrengthProgress = findViewById(R.id.password_strength_progress) + passwordStrengthProgress?.apply { + setIndicatorColor(PasswordEntropy.Strength.RISKY.color) + progress = 0 + max = 100 + } + passwordEntropy = findViewById(R.id.password_entropy) + + mPasswordEntropyCalculator = PasswordEntropy { + passwordText?.text?.toString()?.let { firstPassword -> + getEntropyStrength(firstPassword) + } + } + } + + private fun getEntropyStrength(passwordText: String) { + mPasswordEntropyCalculator?.getEntropyStrength(passwordText) { entropyStrength -> + passwordStrengthProgress.apply { + post { + setIndicatorColor(entropyStrength.strength.color) + setProgressCompat(entropyStrength.estimationPercent, true) + } + } + passwordEntropy.apply { + post { + text = resources.getString(R.string.entropy, + "%.${2}f".format(entropyStrength.entropy) + ) + } + } + } + } + + fun addTextChangedListener(textWatcher: TextWatcher) { + mPasswordTextWatcher.add(textWatcher) + } + + fun removeTextChangedListener(textWatcher: TextWatcher) { + mPasswordTextWatcher.remove(textWatcher) + } + + var passwordString: String + get() { + return passwordText.text.toString() + } + set(value) { + passwordText.text = value + getEntropyStrength(value) + } + + var error: CharSequence? + get() { + return passwordInputLayout.error + } + set(value) { + passwordInputLayout.error = value + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_generate_password.xml b/app/src/main/res/layout/fragment_generate_password.xml index 15047097b..a50e55832 100644 --- a/app/src/main/res/layout/fragment_generate_password.xml +++ b/app/src/main/res/layout/fragment_generate_password.xml @@ -37,36 +37,13 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - - - - + app:layout_constraintEnd_toStartOf="@+id/password_copy_button" /> - - - - diff --git a/app/src/main/res/layout/view_main_credentials.xml b/app/src/main/res/layout/view_main_credentials.xml index 254b53e01..e0f9ff64e 100644 --- a/app/src/main/res/layout/view_main_credentials.xml +++ b/app/src/main/res/layout/view_main_credentials.xml @@ -36,19 +36,16 @@ android:layout_height="wrap_content" android:layout_toRightOf="@+id/password_checkbox" android:layout_toEndOf="@+id/password_checkbox" - android:importantForAccessibility="no" - android:importantForAutofill="no" app:endIconMode="password_toggle" app:endIconTint="?attr/colorAccent"> + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e4bf36a36..ceed15174 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -603,6 +603,7 @@ KiB MiB GiB + Entropy: %1$s bit 5 seconds 10 seconds diff --git a/fastlane/metadata/android/en-US/changelogs/106.txt b/fastlane/metadata/android/en-US/changelogs/106.txt index cadbcca67..636e61e87 100644 --- a/fastlane/metadata/android/en-US/changelogs/106.txt +++ b/fastlane/metadata/android/en-US/changelogs/106.txt @@ -1 +1 @@ - * Show visual password strength indicator #631 \ No newline at end of file + * Show visual password strength indicator with entropy #631 #869 \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/changelogs/106.txt b/fastlane/metadata/android/fr-FR/changelogs/106.txt index 2d6f8f4c2..8f8650e1e 100644 --- a/fastlane/metadata/android/fr-FR/changelogs/106.txt +++ b/fastlane/metadata/android/fr-FR/changelogs/106.txt @@ -1 +1 @@ - * Affichage d'un indicateur visuel de la force du mot de passe #631 \ No newline at end of file + * Affichage d'un indicateur visuel de la force du mot de passe avec entropie #631 #869 \ No newline at end of file