TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-06-2010, 05:35 AM   #1 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default 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.
KingOfTheSouth is offline  
Reply With Quote
Old 11-06-2010, 10:55 PM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

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
__________________

Village Idiot is offline  
Reply With Quote
The Following User Says Thank You to Village Idiot For This Useful Post:
KingOfTheSouth (11-07-2010)
Old 11-06-2010, 11:23 PM   #3 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

Yeah that is what I mean. Sorry was very tired, but that is all I have to do?
KingOfTheSouth is offline  
Reply With Quote
Old 11-07-2010, 12:40 AM   #4 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

thanks killer it worked on the first try.
KingOfTheSouth is offline  
Reply With Quote
Old 11-08-2010, 12:56 AM   #5 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

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 -.-
__________________
My Blog
Enfernikus is offline  
Reply With Quote
Old 12-04-2012, 11:23 AM   #6 (permalink)
The Wanderer
 
Join Date: Nov 2012
Posts: 15
Thanks: 0
abbot is on a distinguished road
Default

yes, encrypting database are stored in the database but it stored in the encrypt form.
abbot is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Injection and mysql_real_escape_string Durux General 61 01-29-2013 12:20 PM
Venerable methods and the applications they are commonly trusted in. Village Idiot Tips & Tricks 7 11-06-2008 07:36 AM
Creating a table from loaded data benton General 5 04-20-2008 11:48 AM
The act of sharing your data Wildhoney General 0 12-06-2007 03:31 PM
Tips: PHP security Village Idiot Tips & Tricks 22 11-23-2007 11:17 PM


All times are GMT. The time now is 06:18 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design