473,320 Members | 1,950 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,320 software developers and data experts.

Hash/encrypt a string

Using .NET, what would be the easiest way to encrypt or hash a string? I have
two integer ID numbers stored in a database that I need to "hide" and append
to an URL. The primary constraint is that there cannot be any modifications
to the database, and that the code should be able to input a hashed or
encrypted string and convert it to the original values.

Thanks!
Mark
Oct 20 '05 #1
1 1309
Mark <Ma**@discussions.microsoft.com> wrote:
Using .NET, what would be the easiest way to encrypt or hash a string? I have
two integer ID numbers stored in a database that I need to "hide" and append
to an URL. The primary constraint is that there cannot be any modifications
to the database, and that the code should be able to input a hashed or
encrypted string and convert it to the original values.


Well, if it's got to be reversible, you *need* encryption rather than
hashing - hashing is a one-way process.

However, if you've got two integers, why are you looking at strings?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Oct 20 '05 #2

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

Similar topics

3
by: Jens U. K. | last post by:
It seems like there is no built in procedure for making a password hash in SQL2000. Am I wrong. Do I have to make it from scratch myself or is there samples out there? /Jens Ulrik
1
by: TG | last post by:
I have code to encrypt a password using the FormsAuthentication.HashPasswordForStoringInConfigFile but I need to know how to take that hash password and return it back to the form having...
1
by: Shapper | last post by:
Hello, I created a login system and I my passwords are being hashed. I need to check if everything is working so I need to generate some hashed passwords to replace the actual passwords I have...
5
by: HamuNaptra | last post by:
Hi im trying to get a hash from a string and conert it back to a string eg. "test" = "098f6bcd4621d373cade4e832627b4f6" my function: Private Function GenerateHash(ByVal SourceText As...
1
by: Mark | last post by:
Using .NET, what would be the easiest way to encrypt or hash a string? I have two integer ID numbers stored in a database that I need to "hide" and append to an URL. The primary constraint is that...
6
by: thecodemachine | last post by:
Hi, I'm looking for a fast and simple one to one hash function, suitable for longer strings (up to 2048 in length). I'd like keys to be relatively short, I doubt I'd be creating more than 256...
1
by: tshad | last post by:
I have a function I am using to encrypt Keys and it doesn't seem to use the Hash I asked for. ************************************ Public Shared Function TripleDESEncode(ByVal value As String,...
2
by: fineman | last post by:
Hi all, I want to get a 64bit(8 bytes) Encrypt result use DES class in the VS2005. Though I encrypt data is 64bit(8 bytes), but DES return encrypt result that always is 128bit(16 bytes), I don't...
2
by: joe shoemaker | last post by:
I would like to convert url into md5 hash. My question is that md5 hash will create collision at 2^64. If you do long(value,16), where value is the md5 hash string, would value returned from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.