mastermind455
ISP
Hi all
I use the code below (which i found somewhere in the internet):
------------------------------------------------------------
<%
Function encrypt(x1, x2)
s = ""
t = 0
For i = 1 to len(x1)
t = t + asc(mid(x1,i,1))
Next
For i = 1 to len(x2)
y = (t + asc(mid(x2,i,1)) * asc(mid(x2,((i+1) mod len(x2)+1),1))) mod 255
s = s & chr
Next
For i = (len(x2) + 1) to 10
If t>598.8 Then t = 598.8
y = t^3*i mod 255
s = s & chr
Next
encrypt = s
End Function
%>
<% response.write encrypt(request.form("Passwort")) %>
------------------------------------------------------------
to encrypt passwords on the fly, as they came from a html form to write down in a .htpasswd file (which is needed to protect Folders within IIS)
now istead of calling the function above the following ASP Eror appears in the Browser:
HTTP 500.100 - Interner Serverfehler - ASP-Fehler
Internet-Informationsdienste
--------------------------------------------------------------------------------
Technische Informationen (für den Support)
Fehlertyp:
Laufzeitfehler in Microsoft VBScript (0x800A01C2)
Falsche Anzahl an Argumenten oder ungültige Eigenschaftszuweisung: 'encrypt'
on english it means the following:
"Run time error in Microsoft VBScript(0x800A01C2)
Wrong amount of arguments or invalid Type Assigment : 'encrypt'
whats wrong, doest it pay eventually a role, where i place the code inside the asp page?
many thanks for your help
best regards
E.Altherr
I use the code below (which i found somewhere in the internet):
------------------------------------------------------------
<%
Function encrypt(x1, x2)
s = ""
t = 0
For i = 1 to len(x1)
t = t + asc(mid(x1,i,1))
Next
For i = 1 to len(x2)
y = (t + asc(mid(x2,i,1)) * asc(mid(x2,((i+1) mod len(x2)+1),1))) mod 255
s = s & chr
Next
For i = (len(x2) + 1) to 10
If t>598.8 Then t = 598.8
y = t^3*i mod 255
s = s & chr
Next
encrypt = s
End Function
%>
<% response.write encrypt(request.form("Passwort")) %>
------------------------------------------------------------
to encrypt passwords on the fly, as they came from a html form to write down in a .htpasswd file (which is needed to protect Folders within IIS)
now istead of calling the function above the following ASP Eror appears in the Browser:
HTTP 500.100 - Interner Serverfehler - ASP-Fehler
Internet-Informationsdienste
--------------------------------------------------------------------------------
Technische Informationen (für den Support)
Fehlertyp:
Laufzeitfehler in Microsoft VBScript (0x800A01C2)
Falsche Anzahl an Argumenten oder ungültige Eigenschaftszuweisung: 'encrypt'
on english it means the following:
"Run time error in Microsoft VBScript(0x800A01C2)
Wrong amount of arguments or invalid Type Assigment : 'encrypt'
whats wrong, doest it pay eventually a role, where i place the code inside the asp page?
many thanks for your help
best regards
E.Altherr