using System; namespace NCC.Core.Pay.Security { public static class Base64Util { public static bool IsBase64String(string str) { Span buffer = stackalloc byte[str.Length]; return Convert.TryFromBase64String(str, buffer, out _); } } }