complex pernament password

lowercase, uppercase, digit, length>=8

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-01-16 19:47:58 +08:00
parent 2a7f8d5367
commit 9aecd28702
34 changed files with 468 additions and 65 deletions

@ -0,0 +1,121 @@
// https://github.com/rodrigobastosv/fancy_password_field
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:get/get.dart';
import 'package:password_strength/password_strength.dart';
abstract class ValidationRule {
String get name;
bool validate(String value);
}
class UppercaseValidationRule extends ValidationRule {
@override
String get name => translate('uppercase');
@override
bool validate(String value) {
return value.contains(RegExp(r'[A-Z]'));
}
}
class LowercaseValidationRule extends ValidationRule {
@override
String get name => translate('lowercase');
@override
bool validate(String value) {
return value.contains(RegExp(r'[a-z]'));
}
}
class DigitValidationRule extends ValidationRule {
@override
String get name => translate('digit');
@override
bool validate(String value) {
return value.contains(RegExp(r'[0-9]'));
}
}
class SpecialCharacterValidationRule extends ValidationRule {
@override
String get name => translate('special character');
@override
bool validate(String value) {
return value.contains(RegExp(r'[!@#$%^&*(),.?":{}|<>]'));
}
}
class MinCharactersValidationRule extends ValidationRule {
final int _numberOfCharacters;
MinCharactersValidationRule(this._numberOfCharacters);
@override
String get name => translate('length>=$_numberOfCharacters');
@override
bool validate(String value) {
return value.length >= _numberOfCharacters;
}
}
class PasswordStrengthIndicator extends StatelessWidget {
final RxString password;
final double weakMedium = 0.33;
final double mediumStrong = 0.67;
const PasswordStrengthIndicator({Key? key, required this.password})
: super(key: key);
@override
Widget build(BuildContext context) {
return Obx(() {
var strength = estimatePasswordStrength(password.value);
return Row(
children: [
Expanded(
child: _indicator(
password.isEmpty ? Colors.grey : _getColor(strength))),
Expanded(
child: _indicator(password.isEmpty || strength < weakMedium
? Colors.grey
: _getColor(strength))),
Expanded(
child: _indicator(password.isEmpty || strength < mediumStrong
? Colors.grey
: _getColor(strength))),
Text(password.isEmpty ? '' : translate(_getLabel(strength)))
.marginOnly(left: password.isEmpty ? 0 : 8),
],
);
});
}
Widget _indicator(Color color) {
return Container(
height: 8,
color: color,
);
}
String _getLabel(double strength) {
if (strength < weakMedium) {
return 'Weak';
} else if (strength < mediumStrong) {
return 'Medium';
} else {
return 'Strong';
}
}
Color _getColor(double strength) {
if (strength < weakMedium) {
return Colors.yellow;
} else if (strength < mediumStrong) {
return Colors.blue;
} else {
return Colors.green;
}
}
}

@ -6,6 +6,7 @@ import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart' hide MenuItem; import 'package:flutter/material.dart' hide MenuItem;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_hbb/common.dart'; import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/common/widgets/custom_password.dart';
import 'package:flutter_hbb/consts.dart'; import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/desktop/pages/connection_page.dart'; import 'package:flutter_hbb/desktop/pages/connection_page.dart';
import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart'; import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart';
@ -543,6 +544,14 @@ void setPasswordDialog() async {
final p1 = TextEditingController(text: pw); final p1 = TextEditingController(text: pw);
var errMsg0 = ""; var errMsg0 = "";
var errMsg1 = ""; var errMsg1 = "";
final RxString rxPass = p0.text.obs;
final rules = [
DigitValidationRule(),
UppercaseValidationRule(),
LowercaseValidationRule(),
// SpecialCharacterValidationRule(),
MinCharactersValidationRule(8),
];
gFFI.dialogManager.show((setState, close) { gFFI.dialogManager.show((setState, close) {
submit() { submit() {
@ -551,15 +560,20 @@ void setPasswordDialog() async {
errMsg1 = ""; errMsg1 = "";
}); });
final pass = p0.text.trim(); final pass = p0.text.trim();
if (pass.length < 6 && pass.isNotEmpty) { if (pass.isNotEmpty) {
for (var r in rules) {
if (!r.validate(pass)) {
setState(() { setState(() {
errMsg0 = translate("Too short, at least 6 characters."); errMsg0 = '${translate('Prompt')}: ${r.name}';
}); });
return; return;
} }
}
}
if (p1.text.trim() != pass) { if (p1.text.trim() != pass) {
setState(() { setState(() {
errMsg1 = translate("The confirmation is not identical."); errMsg1 =
'${translate('Prompt')}: ${translate("The confirmation is not identical.")}';
}); });
return; return;
} }
@ -579,23 +593,44 @@ void setPasswordDialog() async {
), ),
Row( Row(
children: [ children: [
ConstrainedBox(
constraints: const BoxConstraints(minWidth: 100),
child: Text(
"${translate('Password')}:",
textAlign: TextAlign.start,
).marginOnly(bottom: 16.0)),
const SizedBox(
width: 24.0,
),
Expanded( Expanded(
child: TextField( child: TextField(
obscureText: true, obscureText: true,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.all(15),
labelText: translate('Password'),
border: const OutlineInputBorder(), border: const OutlineInputBorder(),
errorText: errMsg0.isNotEmpty ? errMsg0 : null), errorText: errMsg0.isNotEmpty ? errMsg0 : null),
controller: p0, controller: p0,
focusNode: FocusNode()..requestFocus(), focusNode: FocusNode()..requestFocus(),
onChanged: (value) {
rxPass.value = value;
},
),
),
],
),
Row(
children: [
Expanded(child: PasswordStrengthIndicator(password: rxPass)),
],
).marginSymmetric(vertical: 8),
const SizedBox(
height: 8.0,
),
Row(
children: [
Expanded(
child: TextField(
obscureText: true,
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.all(15),
border: const OutlineInputBorder(),
labelText: translate('Confirmation'),
errorText: errMsg1.isNotEmpty ? errMsg1 : null),
controller: p1,
), ),
), ),
], ],
@ -603,26 +638,24 @@ void setPasswordDialog() async {
const SizedBox( const SizedBox(
height: 8.0, height: 8.0,
), ),
Row( Obx(() => Wrap(
children: [ runSpacing: 8,
ConstrainedBox( spacing: 4,
constraints: const BoxConstraints(minWidth: 100), children: rules.map((e) {
child: Text("${translate('Confirmation')}:") var checked = e.validate(rxPass.value.trim());
.marginOnly(bottom: 16.0)), return Chip(
const SizedBox( label: Text(
width: 24.0, e.name,
), style: TextStyle(
Expanded( color: checked
child: TextField( ? const Color(0xFF0A9471)
obscureText: true, : Color.fromARGB(255, 198, 86, 157)),
decoration: InputDecoration(
border: const OutlineInputBorder(),
errorText: errMsg1.isNotEmpty ? errMsg1 : null),
controller: p1,
),
),
],
), ),
backgroundColor: checked
? const Color(0xFFD0F7ED)
: Color.fromARGB(255, 247, 205, 232));
}).toList(),
))
], ],
), ),
), ),

@ -93,6 +93,7 @@ dependencies:
auto_size_text: ^3.0.0 auto_size_text: ^3.0.0
bot_toast: ^4.0.3 bot_toast: ^4.0.3
win32: any win32: any
password_strength: ^0.2.0
dev_dependencies: dev_dependencies:

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", "请求提权"), ("Request Elevation", "请求提权"),
("wait_accept_uac_tip", "请等待远端用户确认UAC对话框。"), ("wait_accept_uac_tip", "请等待远端用户确认UAC对话框。"),
("Elevate successfully", "提权成功"), ("Elevate successfully", "提权成功"),
("uppercase", "大写字母"),
("lowercase", "小写字母"),
("digit", "数字"),
("special character", "特殊字符"),
("length>=8", "长度不小于8"),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", "Erhöhte Rechte anfordern"), ("Request Elevation", "Erhöhte Rechte anfordern"),
("wait_accept_uac_tip", "Bitte warten Sie, bis der entfernte Benutzer den UAC-Dialog akzeptiert hat."), ("wait_accept_uac_tip", "Bitte warten Sie, bis der entfernte Benutzer den UAC-Dialog akzeptiert hat."),
("Elevate successfully", "Erhöhung der Rechte erfolgreich"), ("Elevate successfully", "Erhöhung der Rechte erfolgreich"),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", "Richiedi elevazione dei diritti"), ("Request Elevation", "Richiedi elevazione dei diritti"),
("wait_accept_uac_tip", "Attendere che l'utente remoto accetti la finestra di dialogo UAC."), ("wait_accept_uac_tip", "Attendere che l'utente remoto accetti la finestra di dialogo UAC."),
("Elevate successfully", "Elevazione dei diritti effettuata con successo"), ("Elevate successfully", "Elevazione dei diritti effettuata con successo"),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", "請求提權"), ("Request Elevation", "請求提權"),
("wait_accept_uac_tip", "請等待遠端用戶確認UAC對話框。"), ("wait_accept_uac_tip", "請等待遠端用戶確認UAC對話框。"),
("Elevate successfully", "提權成功"), ("Elevate successfully", "提權成功"),
("uppercase", "大寫字母"),
("lowercase", "小寫字母"),
("digit", "數字"),
("special character", "特殊字符"),
("length>=8", "長度不小於8"),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

@ -423,5 +423,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request Elevation", ""), ("Request Elevation", ""),
("wait_accept_uac_tip", ""), ("wait_accept_uac_tip", ""),
("Elevate successfully", ""), ("Elevate successfully", ""),
("uppercase", ""),
("lowercase", ""),
("digit", ""),
("special character", ""),
("length>=8", ""),
("Weak", ""),
("Medium", ""),
("Strong", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }