Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CryptSafeEquals method
Collapse the table of content
Expand the table of content

SPUtility.CryptSafeEquals method

SharePoint 2013

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)

public static bool CryptSafeEquals(
	string str1,
	string str2
)

Parameters

str1
Type: System.String

The first string to compare

str2
Type: System.String

The second string to compare

Return value

Type: System.Boolean
Show:
© 2015 Microsoft