diff --git a/Masuit.Tools.Abstractions/Strings/NumberFormater.cs b/Masuit.Tools.Abstractions/Strings/NumberFormater.cs index 1c8e412f..e528d4c1 100644 --- a/Masuit.Tools.Abstractions/Strings/NumberFormater.cs +++ b/Masuit.Tools.Abstractions/Strings/NumberFormater.cs @@ -131,7 +131,7 @@ public NumberFormater(byte @base, byte offset = 0) { <= 2 => "01", > 2 and < 65 => "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/".Substring(0, @base), - >= 65 and <= 95 => "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!@$#%*+?&()/\\,-:;<=>?[]^`{|}~'\"".Substring(0, @base), + >= 65 and <= 95 => "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-!~'*()@$#%+?&/\\,:;<=>?[]^`{|}\"".Substring(0, @base), _ => throw new ArgumentException("默认进制最大支持91进制") }; diff --git a/Masuit.Tools.Abstractions/Systems/SnowFlake.cs b/Masuit.Tools.Abstractions/Systems/SnowFlake.cs index f1c949e3..5aecb1e9 100644 --- a/Masuit.Tools.Abstractions/Systems/SnowFlake.cs +++ b/Masuit.Tools.Abstractions/Systems/SnowFlake.cs @@ -1,6 +1,8 @@ using Masuit.Tools.DateTimeExt; using Masuit.Tools.Strings; using System; +using System.Linq; +using System.Net.NetworkInformation; namespace Masuit.Tools.Systems { @@ -49,7 +51,8 @@ public static SnowFlake GetInstance() /// public SnowFlake() { - Snowflakes(0); + var bytes = NetworkInterface.GetAllNetworkInterfaces().FirstOrDefault().GetPhysicalAddress().GetAddressBytes(); + Snowflakes(bytes[4] << 4 | bytes[5]); } ///