473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

easy way to do basic querystring encryption?

I'm getting a URL w/ a querystring coming in to start my app.
In session_start, I was thinking of scrambling that querystring to keep it
from prying eyes....
Any ideas?
Doesn't need to be fullproof, just quick and dirty :) ty jason shohet
Nov 18 '05 #1
4 1664
TJS
http://www.antoniob.com/projects/PUriQueryCrypt.aspx

"Jason Shohet" <__******@yahoo.com> wrote in message
news:OD**************@TK2MSFTNGP12.phx.gbl...
I'm getting a URL w/ a querystring coming in to start my app.
In session_start, I was thinking of scrambling that querystring to keep it from prying eyes....
Any ideas?
Doesn't need to be fullproof, just quick and dirty :) ty jason shohet

Nov 18 '05 #2
i downloaded it but can't seem to find the encryption class file :) In fact
i don't see any dll's, or .cs files, just .pas & .dpk files, whatever those
are.
Not sure how to use that in my asp.net / c# codebehind environment

TY
Nov 18 '05 #3
Sorry for untidy code, yet I used it for a specific task of en/decrypting longs.

Public Shared Function Encode(ByVal cnum As Long) As String
Dim i0 As Long
Dim e As Long
Dim tcnum As Long
Dim pos As Integer, a As Integer
Dim str As String
Dim i As Integer

Randomize()
i0 = CInt(Int(26 * Rnd()))
str = Chr(Asc("A") + i0)
e = 29
tcnum = cnum Xor &H55555555
pos = i0
For i = 0 To 7
a = tcnum Mod 16
pos = (pos + a * e) Mod 26
str &= Chr(Asc("A") + pos)
tcnum = Int(tcnum / 16)
Next
Return str
End Function

Public Shared Function Decode(ByVal str As String) As Long
Dim i As Integer
Dim tcnum As Long
Dim a As Integer
tcnum = 0
For i = str.Length - 1 To 1 Step -1
tcnum *= 16
a = (Asc(str.Chars(i)) - Asc(str.Chars(i - 1)) + 26) Mod 26
a = (a + (a Mod 3) * 26) / 3
tcnum += a
Next i
Return (tcnum Xor &H55555555)
End Function

--
Best regards,

Andrew P. Revinsky
"Jason Shohet" wrote:
i downloaded it but can't seem to find the encryption class file :) In fact
i don't see any dll's, or .cs files, just .pas & .dpk files, whatever those
are.
Not sure how to use that in my asp.net / c# codebehind environment

TY

Nov 18 '05 #4
"Jason Shohet" <__******@yahoo.com> wrote in
news:us**************@TK2MSFTNGP09.phx.gbl:
i downloaded it but can't seem to find the encryption class file :)
In fact i don't see any dll's, or .cs files, just .pas & .dpk files,
whatever those are.
Not sure how to use that in my asp.net / c# codebehind environment

The files were built with Borland Delphi .NET

Just use the DLLs in the BIN directory.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ian N | last post by:
Hi, I've had to quickly servers and need to turn an ASP script into PHP, i got the original script from: - http://www.4guysfromrolla.com/webtech/012000-1.shtml Does anyone know of a PHP...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
6
by: Richard | last post by:
I'm looking to do my own basic encryption. I've been tyring to do a concept such as: I pass this function the string, key and number of rounds I want to do the encryption. because im round...
6
by: Sahil Malik [MVP] | last post by:
Public Private Key Pairs - How do they work? ----------------------------------------------- I was looking at a presentation recently in which it was suggested that - User 1 Encrypts a message...
3
by: Arjen | last post by:
Hello, Can somebody tell my if it is posible to create a QueryString encryption/decryption that works from a higher level then the code view... For example: I have an URL like...
1
by: Nils N | last post by:
Hi all, Does anyone have a best practice for performring querystring authentication. I am now sending an email with a url to which the user clicks to confirm his or her registration. The url...
2
by: Craig HB | last post by:
I need to pass a variable in a querystring that I want to hide from the user. eg www.abc.com?UserID=555 and the UserID must be hidden. I was thinking of encrypting the ID, using a UserGUID that...
2
by: damod.php | last post by:
what's the Basic Encryption method used in mysql, whats iner join whats outer join ,diff b/w.what are the encryption methods used to encrypt the user name and password.in php/mysql
7
by: j1mb0jay | last post by:
I have created some simple string encryption in C# to be able to store passwords in a database without them being stored in plain text. I have attached a encrypted passage from a book I like....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.