ユーザーが入力したパスワードのパスワード強度を伝える Android アプリケーションを開発することを考えています。
パスワードの強度を確認するという点では、これら2 つのアルゴリズムを開発して確認しました。しかし、効率的ではないと思うので、これらのアルゴリズムを使用することを考え直しています。皆さんはどう思いますか?
ここに私の2つのアルゴリズムがあります:
平均法
Sample input = Password12@
1. Count the lowercase, uppercase, digits and special characters in the given String.
Eg.
Lowercase count = 7;
Uppercase count = 1;
Digits count = 2;
SpecialCharacter count = 1;
2. Get the character count and multiply it to the size of given String.
Eg.
(Count * Size)
(7 * 10) = 70
(1 * 10) = 10
(2 * 10) = 20
(1 * 10) = 10
3. Add the following results
Eg.
70 + 10 + 20 + 10 = 110
4. Get the results which is the password strength.
Eg.
The password is 110% strong.
ポイント方式
Sample input = Password12@
1. Set the points such that for every:
Lowercase = 1 point given
Uppercase = 5 points given
Digits = 10 points given
Special Character = 15 points given
2. Count the lowercase, uppercase, digits and special characters in the given String.
Eg.
Lowercase count = 7;
Uppercase count = 1;
Digits count = 2;
SpecialCharacter count = 1;
3. Get the character count and add it to the given point and multiply the size of the given String.
Eg.
(Count + Point) * size
(7 + 1) * 10 = 80;
(1 + 5) * 10 = 60;
(2 + 10) * 10 = 120;
(1 + 15) * 10 = 160;
4. Add the following results and divide it to the size of given String and divide it by 4.
Eg.
//4 because count={uppercase, lowercase, digits, special character}
80 + 60 + 120 + 160 = 420
420 / 4 = 105
5. Get the result which is the pswword strength.
Eg.
The password strength is 105%.
私の質問は次のとおりです。
実装が優れていることを示したアルゴリズムはどれですか?
指定された 2 つのアルゴリズムが非効率的である場合、指定されたパスワードの強度を確認するために使用できる既存のアルゴリズムはありますか。このようなものではなく、車輪の再発明です。