SPUtility.CryptSafeEquals method

Test two strings for equality in such a way that the execution time of the compare is independent of which bytes in the strings are equal.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function CryptSafeEquals ( _
    str1 As String, _
    str2 As String _
) As Boolean
'Usage
Dim str1 As String
Dim str2 As String
Dim returnValue As Boolean

returnValue = SPUtility.CryptSafeEquals(str1, _
    str2)
public static bool CryptSafeEquals(
    string str1,
    string str2
)

Parameters

Return value

Type: System.Boolean

See also

Reference

SPUtility class

SPUtility members

Microsoft.SharePoint.Utilities namespace