Hi All,
I am trying to encrypt the query string from page to page...so the calling page must encrypt the query string, and the called page must decrypt it...
When I run it without encryption (same code), I have no problems. When I try with the encrypted query string, I get the following message...
Microsoft VBScript runtime error '800a01a8'
Object required: 'objSharedCrypto'
/shared/includes/Crypt.asp, line 52
This is where we are decrypting...
Code:
Dim QSColl, strRequestQS
Set QSColl = RequestQS2()
rptid = QSColl("rptid")
dataid = QSColl("dataid")
If dataid = "" Then dataid = rptid
DataSession = "RPT-" & dataid
strUDBId = Session("VMAccount")
This is the RequestQS2 function I am calling
Code:
Function RequestQS2()
Dim objQS, key
Dim objQSDict
Dim strQS ' Set to Request.QueryString.
strQS = Request.QueryString
If EncryptedQS() Then
Set objQS = DecryptToQS(strQS, Salt())
'Set objQSDict = Server.CreateObject("Scripting.Dictionary")
'For Each key In objQS
' objQSDict.Add LCase(key), objQS(key)
'Next
Set RequestQS2 = objQS
Set objQS = Nothing
Set objQSDict = Nothing
Else
Set RequestQS2 = Request.QueryString
End If
End Function
Which in turn calls on the DecryptToQS function below if the query string is indeed encypted
Code:
Function DecryptToQS(ByVal Str, ByVal Salt)
If EncryptedStr(Str) Then
' Remove Prefix.
Str = Right(Str, Len(Str) - Len(QSPrefix()))
Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt)
Else
DecryptToQS = Str
End If
End Function
this is line 52 in shared/includes/crypt.asp
Code:
Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt)
on the first line of Crypt.asp there is the following declaration
Code:
Dim objSharedCrypto
Set objSharedCrypto = Server.CreateObject("Crypto.QueryString")
So I am not sure what the problem is, I've used the function with other pages, and it works fine...something is happening with this particular page however.
Any ideas or suggestions?
I appreciate the help
Thanks