Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 25th, 2009, 11:36 AM
Registered User
Join Date: Jul 2009
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Hash and un-hash

Dear experts,
Please point me to the right direction.

I have a MS SQL table, let's called it "year_end", there is a column with sensitive data called "customer ID", I would like to hash the "customer ID" column by the identity column and then load it into a new table row by row with the hash result. Example:

The "year_end" table:

name varchar(30)
address varchar(30)
customer_ID char(9)

The new "year_end" table:

name varchar(30)
address varchar(30)
customer_ID ???? (hash value)

samjudson posted a reply:
"I'd recommend a MD5 hash of the column. A simple search for "MD5 C#" should provide you with the samples you need."

But I forgot to mention that I have a C# program that needs to access the new "year_end" table and displays the customer_ID on the web page, so I need to "un-hash" the customer_ID. How do I "un-hash"the customer_ID??
Old August 25th, 2009, 11:40 AM
samjudson's Avatar
Friend of Wrox
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts

You can't unhash - at least not with MD5 and such.

You need to be looking into Encrypting and Unencrypting instead.
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing two images in C# (without HASH) aakash494 C# 6 June 9th, 2009 11:29 AM
Storing hash table into a file sanjh Java Basics 3 April 10th, 2009 11:31 PM
Abt Hash Code.. pandian Java Basics 3 January 18th, 2006 06:31 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.