namespace Asb.Base.V2; public static class AuthenticationDataExtensions { public static bool AreEqual(this AuthenticationData value, AuthenticationData other) { try { if (value != null && value.Data != null && other != null && other.Data != null) { return value.AreEqual(other.Data); } } catch { } return false; } public static bool AreEqual(this AuthenticationData value, byte[] expected) { bool result = false; try { if (value != null && value.Data != null && expected != null && value.Data.Length == expected.Length) { result = true; for (int i = 0; i < value.Data.Length; i++) { if (value.Data[i] != expected[i]) { result = false; break; } } } } catch { result = false; } return result; } }