Creating an Order Column for encrypted data

Posted by SetiSeeker on Stack Overflow See other posts from Stack Overflow or by SetiSeeker
Published on 2012-09-03T09:36:11Z Indexed on 2012/09/03 9:37 UTC
Read the original article Hit count: 209

Filed under:
|
|
|

I am saving encrypted data to a database.

Is there a way I can create a "hashcode" or fingerprint or checksum of the plain text data, that if I sort / order by on the "hashcode" the order would be the same as if I had saved the plain text data and perform the same sort / order by operation on it?

I basically need a SOUNDEX() type function that will give me a value that will maintain the order of the plain text data. I would then save both encrypted data and the "hashcode" and when querying the data order by the "hashcode" field.

I need to perform this in the application and preferably not in the SQL DB if at all possible.

I am using Entity Framework and SQL 2008 and C# 4.0.

© Stack Overflow or respective owner

Related posts about c#

Related posts about sorting