TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   MySQL & Databases (http://www.talkphp.com/mysql-databases/)
-   -   Encrypting data already stored (http://www.talkphp.com/mysql-databases/5624-encrypting-data-already-stored.html)

KingOfTheSouth 11-06-2010 05:35 AM

Encrypting data already stored
 
Hi everyone,

I was wondering does anyone know of a way to encrypt database that is already stored in the database?

I am using SHA1 if it matters.

Village Idiot 11-06-2010 10:55 PM

A database that is already stored in a database? Do you mean data that is already stored in a database? If so:
Code:

UPDATE table SET field=SHA1(field) WHERE 1

KingOfTheSouth 11-06-2010 11:23 PM

Yeah that is what I mean. Sorry was very tired, but that is all I have to do?

KingOfTheSouth 11-07-2010 12:40 AM

thanks killer it worked on the first try.

Enfernikus 11-08-2010 12:56 AM

Not to nit-pick but encryption is a two-way process, whereas SHA1 is a process that's irreversible and so by definition not a method of encryption but a hash method.

I don't mean to appear pompous but if you're a developer then details, particularly, when communicating technical details is extremely important.

It's something thats been really bothering me at work -.-

abbot 12-04-2012 11:23 AM

yes, encrypting database are stored in the database but it stored in the encrypt form.


All times are GMT. The time now is 11:07 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0