共用方式為


SPUtility.CryptSafeEquals method

測試兩個相等的字串比較執行時間無關的哪些位元組的字串是相等的這類的方式。

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

Syntax

'宣告
Public Shared Function CryptSafeEquals ( _
    str1 As String, _
    str2 As String _
) As Boolean
'用途
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
)

參數

傳回值

Type: System.Boolean

請參閱

參照

SPUtility class

SPUtility members

Microsoft.SharePoint.Utilities namespace