You are here: Re: MD5 encrypt a list of password from a file « PHP Programming Language « IT news, forums, messages
Re: MD5 encrypt a list of password from a file

Posted by Jim Michaels on 02/16/06 22:34

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:x56dnZgdX4HI9XfenZ2dnUVZ_tadnZ2d@comcast.com...
> Declan Barry wrote:
>> Hi all..
>>
>> Does anyone have a php script that would allow me to encrypt the
>> contents of a txt file?
>>
>> I have an excel file which has a list of usernames and generated
>> passwords. What I would like to do is copy out the plaintext
>> passwords to a txt file and then do a conversion to encrypt the
>> passwords using MD5 encryption as they will then be imported into a
>> MySQL database.
>>
>> Is that possible?
>>
>> I can do them one at a time using a small php script but I've approx
>> 100+ to do.
>>
>> Regards
>>
>> Declan Barry
>
> I wouldn't even write code for it. Just export the data to CSV, import it
> into MySQL and do it from there.
>
> For instance, if your excel file has
>
> userid password
>
> Create three columns in your table - uid, temppw and pw. Export the Excel
> file as CSV format and load it into the table. Then simply update the
> table, setting pw to MD5(temppw).

one thing that will make your passwords harder to crack is by prepending and
appending some fixed string to the password in question before feeding it to
MD5()
like MD5("hornswigl{$password}fizzleblat")
when you go to compare passwords, you of course need to use the same thing
on one side to compare with your db.

>
> The just drop the temppw column.
>
> No programming required.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация