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
)
參數
str1
Type: System.String要比較的第一個字串。
str2
Type: System.String要比較的第二個字串。
傳回值
Type: System.Boolean