mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
parent
bf581a1ba4
commit
425a632965
1 changed files with 4 additions and 2 deletions
|
@ -30,9 +30,11 @@ namespace {
|
||||||
[[nodiscard]] ProxyData::Status HexMtprotoPasswordStatus(
|
[[nodiscard]] ProxyData::Status HexMtprotoPasswordStatus(
|
||||||
const QString &password) {
|
const QString &password) {
|
||||||
const auto size = password.size() / 2;
|
const auto size = password.size() / 2;
|
||||||
|
const auto type1 = password[0].toLower();
|
||||||
|
const auto type2 = password[1].toLower();
|
||||||
const auto valid = (size == 16)
|
const auto valid = (size == 16)
|
||||||
|| (size == 17 && (password[0] == 'd') && (password[1] == 'd'))
|
|| (size == 17 && (type1 == 'd') && (type2 == 'd'))
|
||||||
|| (size >= 21 && (password[0] == 'e') && (password[1] == 'e'));
|
|| (size >= 21 && (type1 == 'e') && (type2 == 'e'));
|
||||||
if (valid) {
|
if (valid) {
|
||||||
return ProxyData::Status::Valid;
|
return ProxyData::Status::Valid;
|
||||||
} else if (size < 16) {
|
} else if (size < 16) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue