0

I have a database which stores some fields as encrypted data. The reason for this is because if the database is accessed from the server then server staff cannot get a list of names and email addresses.

But the problem is that when I retrieve a list of my users from my control panel, I cannot sort them ASC or DESC on the fields that have been encrypted. Of course the data can be decrypted and displayed normally for me to read, but how to sort those columns when they are stored like...

0605040977504E5C504A5F555259415A5D515A5F565
555259415A5D515A5F565D413E2A14CAD06D
D06D901720C7FDB7BD596BA429B4CE3CDA08B4CE
504E5C504A5F555259415A5D515A5F565D413E2A1

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by ArtistScope
0

We eventually solved this one by creating an extra column for an index using the first few letters of the subject line, so the column sorted looks like...

ADAYATTHE
AMIDSUMME
HOWTOADDA
THEFIRSTO
WHATAJOKE

This way the records could be sorted in alphabetical order, and yes it can have some duplicates but at least they will be listed in the correct order of things and should one be investigated or hacked then they won't be getting any easy clues as to what is what.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.