opt: check private key size

This commit is contained in:
lollipopkit
2023-02-17 16:29:46 +08:00
parent 99aa0fc1f5
commit 0c198c23fc
11 changed files with 141 additions and 99 deletions

View File

@@ -33,38 +33,41 @@ class MessageLookup extends MessageLookupByLibrary {
static String m5(file) => "${file} not exist";
static String m6(count) => "Found ${count} update";
static String m6(file, size, sizeMax) =>
"File \'${file}\' too large ${size}, max ${sizeMax}";
static String m7(code) => "request failed, status code: ${code}";
static String m7(count) => "Found ${count} update";
static String m8(url) =>
static String m8(code) => "request failed, status code: ${code}";
static String m9(url) =>
"Please make sure that docker is installed correctly, or that you are using a non-self-compiled version. If you don\'t have the above issues, please submit an issue on ${url}.";
static String m9(myGithub) => "\nMade with ❤️ by ${myGithub}";
static String m10(myGithub) => "\nMade with ❤️ by ${myGithub}";
static String m10(url) => "Please report bugs on ${url}";
static String m11(url) => "Please report bugs on ${url}";
static String m11(date) => "Are you sure to restore from ${date} ?";
static String m12(date) => "Are you sure to restore from ${date} ?";
static String m12(time) => "Spent time: ${time}";
static String m13(time) => "Spent time: ${time}";
static String m13(url) =>
static String m14(url) =>
"This function is now in the experimental stage.\n\nPlease report bugs on ${url} or join our development.";
static String m14(name) => "Are you sure to delete [${name}]?";
static String m15(name) => "Are you sure to delete [${name}]?";
static String m15(server) => "Are you sure to delete server [${server}]?";
static String m16(server) => "Are you sure to delete server [${server}]?";
static String m16(newest) => "Update: v1.0.${newest}";
static String m17(newest) => "Update: v1.0.${newest}";
static String m17(newest) =>
static String m18(newest) =>
"Current version is too low, please update to v1.0.${newest}";
static String m18(build) => "Found: v1.0.${build}, click to update";
static String m19(build) => "Found: v1.0.${build}, click to update";
static String m19(build) => "Current: v1.0.${build}";
static String m20(build) => "Current: v1.0.${build}";
static String m20(build) => "Current: v1.0.${build}, is up to date";
static String m21(build) => "Current: v1.0.${build}, is up to date";
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
@@ -139,12 +142,13 @@ class MessageLookup extends MessageLookupByLibrary {
"fieldMustNotEmpty": MessageLookupByLibrary.simpleMessage(
"These fields must not be empty."),
"fileNotExist": m5,
"fileTooLarge": m6,
"files": MessageLookupByLibrary.simpleMessage("Files"),
"foundNUpdate": m6,
"foundNUpdate": m7,
"go": MessageLookupByLibrary.simpleMessage("Go"),
"goto": MessageLookupByLibrary.simpleMessage("Go to"),
"host": MessageLookupByLibrary.simpleMessage("Host"),
"httpFailedWithCode": m7,
"httpFailedWithCode": m8,
"imagesList": MessageLookupByLibrary.simpleMessage("Images list"),
"import": MessageLookupByLibrary.simpleMessage("Import"),
"importAndExport":
@@ -157,7 +161,7 @@ class MessageLookup extends MessageLookupByLibrary {
"invalidJson": MessageLookupByLibrary.simpleMessage("Invalid JSON"),
"invalidVersion":
MessageLookupByLibrary.simpleMessage("Invalid version"),
"invalidVersionHelp": m8,
"invalidVersionHelp": m9,
"isBusy": MessageLookupByLibrary.simpleMessage("Is busy now"),
"keepForeground":
MessageLookupByLibrary.simpleMessage("Keep app foreground!"),
@@ -168,7 +172,7 @@ class MessageLookup extends MessageLookupByLibrary {
"loadingFiles":
MessageLookupByLibrary.simpleMessage("Loading files..."),
"loss": MessageLookupByLibrary.simpleMessage("loss"),
"madeWithLove": m9,
"madeWithLove": m10,
"max": MessageLookupByLibrary.simpleMessage("max"),
"maxRetryCount": MessageLookupByLibrary.simpleMessage(
"Number of server reconnection"),
@@ -213,11 +217,11 @@ class MessageLookup extends MessageLookupByLibrary {
"privateKey": MessageLookupByLibrary.simpleMessage("Private Key"),
"pwd": MessageLookupByLibrary.simpleMessage("Password"),
"rename": MessageLookupByLibrary.simpleMessage("Rename"),
"reportBugsOnGithubIssue": m10,
"reportBugsOnGithubIssue": m11,
"restore": MessageLookupByLibrary.simpleMessage("Restore"),
"restoreSuccess": MessageLookupByLibrary.simpleMessage(
"Restore success. Restart app to apply."),
"restoreSureWithDate": m11,
"restoreSureWithDate": m12,
"result": MessageLookupByLibrary.simpleMessage("Result"),
"run": MessageLookupByLibrary.simpleMessage("Run"),
"save": MessageLookupByLibrary.simpleMessage("Save"),
@@ -243,14 +247,14 @@ class MessageLookup extends MessageLookupByLibrary {
"showDistLogo":
MessageLookupByLibrary.simpleMessage("Show distribution logo"),
"snippet": MessageLookupByLibrary.simpleMessage("Snippet"),
"spentTime": m12,
"sshTip": m13,
"spentTime": m13,
"sshTip": m14,
"start": MessageLookupByLibrary.simpleMessage("Start"),
"stop": MessageLookupByLibrary.simpleMessage("Stop"),
"sureDelete": m14,
"sureDelete": m15,
"sureNoPwd": MessageLookupByLibrary.simpleMessage(
"Are you sure to use no password?"),
"sureToDeleteServer": m15,
"sureToDeleteServer": m16,
"termTheme": MessageLookupByLibrary.simpleMessage("Terminal theme"),
"times": MessageLookupByLibrary.simpleMessage("Times"),
"ttl": MessageLookupByLibrary.simpleMessage("ttl"),
@@ -264,14 +268,14 @@ class MessageLookup extends MessageLookupByLibrary {
"You set to 0, will not update automatically.\nCan\'t calculate CPU status."),
"updateServerStatusInterval": MessageLookupByLibrary.simpleMessage(
"Server status update interval"),
"updateTip": m16,
"updateTipTooLow": m17,
"updateTip": m17,
"updateTipTooLow": m18,
"upsideDown": MessageLookupByLibrary.simpleMessage("Upside Down"),
"urlOrJson": MessageLookupByLibrary.simpleMessage("URL or JSON"),
"user": MessageLookupByLibrary.simpleMessage("User"),
"versionHaveUpdate": m18,
"versionUnknownUpdate": m19,
"versionUpdated": m20,
"versionHaveUpdate": m19,
"versionUnknownUpdate": m20,
"versionUpdated": m21,
"waitConnection": MessageLookupByLibrary.simpleMessage(
"Please wait for the connection to be established."),
"willTakEeffectImmediately":