i would like to encrypt some data and i do not know how? How i can make a secure log in to a web server?
Thank you very much

Member Avatar for diafol

Do you mean encryption or hashing? Encryption is two-way and hashing is one-way. Hashing is the usual method of protecting passwords in a DB for log in purposes. I tend to use md5(), but with a salt, e.g.

$saltedhash = md5("sc00by d00" . $password . "sh499y");

The downside with hashes is that because they're one-way, the original string is lost and cannot be retrieved if an user forgets their password. You could include a 'question to remember' or e-mail a new unique temporary p/w, which users have to change on login in this case.

the main i want to encrypt the data is because i don't want anyone to read them so you think that md5 is the best way for it? Can't be broken the md5?
Thank you very much

Member Avatar for diafol

I'm not saying it can't be broken, but it's pretty good - sufficient for me anyway. SHA variants are also worth looking at. Note - this is hashing, not encrypting. Encryption involves an algorithm creating some ciphertext which can be decrypted with an appropriate key. md5 cannot be decrypted or 'dehashed'.

I'm not saying it can't be broken, but it's pretty good - sufficient for me anyway. SHA variants are also worth looking at. Note - this is hashing, not encrypting. Encryption involves an algorithm creating some ciphertext which can be decrypted with an appropriate key. md5 cannot be decrypted or 'dehashed'.

That is until I complete my dehasher for the sha series than I will continue on the md series. A hard thing to do but fun.

thank you very much for your help

Member Avatar for diafol

Are we solved?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.