473,748 Members | 8,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1699
TJS
http://www.antoniob.com/projects/PUriQueryCrypt.aspx

"Jason Shohet" <__******@yahoo .com> wrote in message
news:OD******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP09.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********@rog ers.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
6139
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 version of this? otherwise it's gonna be a few hours sifting through it and converting it line by line.
7
9289
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. # No warranty express or implied for the accuracy, fitness to purpose
6
12991
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 shifting the bits the decryption doesn't work.. :P Am I going about this all wrong or does anybody know an easier way (besides getting an open source algo class such as Crypto++) I'm super new to fooling with the bits/encryption
6
2563
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 using User 2's Public Key. User 2 Decrypts the transmission using his Private Key to get the orignal message. Is the above correct?
3
2066
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 www.mysite.com/index.aspx?id=123&print=no Must be changed to: www.mysite.com/index.aspx?2342342375675675676756
1
1998
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 contains a Guid in the querystring, and this is validated agains the user's uniqueidenfier in the sql server database. How secure is the uniqueidentifer, and should I use a md5 encryption with a seed, or DES encryption instead?
2
1280
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 would change every night, or passing and an array and index and getting the correct UserID from that. Any ideas / suggestions Craig
2
2513
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
4086
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. Please let me know if it is really simple to crack. Regards j1mb0jay
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.