Public Class weixin

时间:2022-05-28 10:33:59
【文件属性】:

文件名称:Public Class weixin

文件大小:23KB

文件格式:TXT

更新时间:2022-05-28 10:33:59

vb

Public Function CheckSignature() As Boolean Dim signature As String = System.Web.HttpContext.Current.Request.QueryString("signature") Dim timestamp As String = System.Web.HttpContext.Current.Request.QueryString("timestamp") Dim nonce As String = System.Web.HttpContext.Current.Request.QueryString("nonce") Dim ArrTmp() As String = {Token, timestamp, nonce} Array.Sort(ArrTmp) ' WriteLog("signature" & ":" & signature) ' WriteLog("timestamp" & ":" & timestamp) ' WriteLog("nonce" & ":" & nonce) Dim tmpStr As String = String.Join("", ArrTmp) ' WriteLog("tmpStr" & ":" & tmpStr) '//是加密模式,开启以下代码 ' tmpStr = FormsAuthentication.HashPasswordForStoringInConfigFile(tmpStr, "SHA1") tmpStr = tmpStr.ToLower 'WriteLog("tmpStr" & ":" & tmpStr) '// If tmpStr = signature Then CheckSignature = True WriteLog("CheckSignature" & ":" & "true") Else CheckSignature = False WriteLog("CheckSignature" & ":" & "False") End If


网友评论