chore(all): resolve lint findings, update example plugin, refine docs and add LGPL licenses

This commit is contained in:
2026-10-07 00:57:35 +08:00
parent e8e9d77974
commit 8e8ddeddb6
388 changed files with 4638 additions and 3321 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
using System.Globalization;
using System;
using System.Security.Cryptography;
using System.Text;
@@ -22,10 +23,10 @@ internal static class ServerLoginPreferences
internal static string Key(string prefix, string origin)
{
string normalized = NormalizeOrigin(new Uri(origin, UriKind.Absolute));
using SHA256 sha = SHA256.Create();
using var sha = SHA256.Create();
byte[] digest = sha.ComputeHash(Encoding.UTF8.GetBytes(normalized));
var hex = new StringBuilder(digest.Length * 2);
foreach (byte value in digest) hex.Append(value.ToString("x2"));
foreach (byte value in digest) hex.Append(value.ToString("x2", CultureInfo.InvariantCulture));
return prefix + hex;
}