how can searching encrypted data in through data base |
[eluser]Unknown[/eluser]
Code: function searchSubscribeUserDetails($offset = 0, $row_count = 0,$columnname,$searchword) Quote:email is encrypted in database.if we search astring of email than some of searc and some of not search like
[eluser]obiron2[/eluser]
I don't think you can do that, The SHA enryption is based on the whole string, not part of it, so just encryping the search term will not give you the same string as encrypting the whole thing. you would need to hold the unencrypted email address on a secure server with a token ID and store the token ID in your database (this is how mail order companies hold your credit card details). The unencrypted search would be passed to the secure database which would return the token ID which you can then match to your records. Obiron
[eluser]Cristian Gilè[/eluser]
[quote author="obiron2" date="1295897735"]I don't think you can do that, The SHA enryption is based on the whole string, not part of it, so just encryping the search term will not give you the same string as encrypting the whole thing. you would need to hold the unencrypted email address on a secure server with a token ID and store the token ID in your database (this is how mail order companies hold your credit card details). The unencrypted search would be passed to the secure database which would return the token ID which you can then match to your records. Obiron[/quote] It's not a SHA encryption but a base64 encoding. @mankisun: You could keep two separate columns, one for the local-part and one for the domain name. For example the record for the sandesh@yahoo.com address becomes: Code: localpart |domain The @ symbol, in my example is not encoded. Cristian Gilè |
Welcome Guest, Not a member yet? Register Sign In |