diff --git a/GameFrameX.Foundation.Hash/Md5Helper.cs b/GameFrameX.Foundation.Hash/Md5Helper.cs index a6e8c36..02485f6 100644 --- a/GameFrameX.Foundation.Hash/Md5Helper.cs +++ b/GameFrameX.Foundation.Hash/Md5Helper.cs @@ -31,6 +31,7 @@ // Official Documentation: https://gameframex.doc.alianblank.com/ // ========================================================================================== +using System.Diagnostics.CodeAnalysis; using System.Security.Cryptography; using System.Text; @@ -163,6 +164,7 @@ public static string Hash(Stream input) /// 要计算哈希值的流 / The stream to compute the hash for /// 用于取消异步操作的令牌 / Token used to cancel the asynchronous operation /// 小写十六进制字符串形式的哈希值 / The lowercase hexadecimal hash value + [SuppressMessage("Sonar Code Smell", "S4790:Use a stronger hashing algorithm", Justification = "MD5 is intentionally used here for non-cryptographic checksum / fingerprint / cache-key scenarios; for security-sensitive use cases call Sha256Helper instead.")] public static async Task HashAsync(Stream input, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(input, nameof(input));