You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Compares two immutable byte arrays for equality in a way that is resistant to timing attacks.
86
+
/// </summary>
87
+
/// <remarks>This method performs a constant-time comparison to prevent timing attacks, which can occur when
88
+
/// the time taken to compare two values leaks information about their contents. The method ensures that the
89
+
/// comparison time depends only on the length of the immutable arrays, not their contents. <para> If the immutable arrays have different
90
+
/// lengths, the method returns <see langword="false"/> immediately. </para></remarks>
91
+
/// <param name="left">The first byte array to compare. Cannot be <see langword="null"/>.</param>
92
+
/// <param name="right">The second byte array to compare. Cannot be <see langword="null"/>.</param>
93
+
/// <returns><see langword="true"/> if the two immutable byte arrays are equal; otherwise, <see langword="false"/>.</returns>
94
+
/// <exception cref="System.ArgumentNullException">Thrown if either <paramref name="left"/> or <paramref name="right"/> is <see langword="null"/>.</exception>
0 commit comments