Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:28:14+00:00 2026-06-03T02:28:14+00:00

Ok i know this topic is brought up a lot in stackoverflow but they

  • 0

Ok i know this topic is brought up a lot in stackoverflow but they don’t underline the answers that im looking for.

I use md5 encryption which i told(it was a while ago when i was a noob at php)was safe but if you look it up on good old google its has encrypted and decryption.

so i started to look other places aka here.

ive heard about all the encryption methods so for example SHA-1,MD5,SHA-2,SHA-256,SHA-512 and so on.

A lot of people say use Bcrypt which im looking over, its that vs SHA-512.

and people say use a random salt and save it in your database which is stupid because say a hacker hacks you database and get the salt of all your passwords so it’s a small window to change all the salts before the hacker decrypts all the passwords and go on to other places and try them for instance facebook,google and stackoverflow

So my question is it the safest way doing it like this (encrypting (with SHA-512) and using a random salt which will also be stored in a database) or use a fixed salt which is hard wired into my php code which has the same amount of security as the database random salt.

And i have read a lot of posts on this so i think i know what im talking about and i like to impassive that i have read many posts about this about 20 to be precise.

OH almost forgot and is it safer if you encrypt the password multiple times or is about the same as only one encryption?

Thanks for you’r help on a much over written post

Im Sorry for the people im confusing a bit but i didn’t get the point of some other peoples posts and i started rambling on about encryption but i was talking about hashing strings.

sorry for that

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:28:15+00:00Added an answer on June 3, 2026 at 2:28 am

    I use md5 encryption which i told(it was a while ago when i was a noob at php)was safe but if you look it up on good old google its has encrypted and decryption.

    First some nitpicking. It is hashing and not encrypting. Hashing is one way. Now to answer your question: don’t use md5() to hash passwords. It’s not safe anymore. It has been broken for some years now. Not only has there been collisions found (multiple values which result in the same hash), but md5 can be bruteforced really really fast with any decent GPU.

    A lot of people say use Bcrypt which im looking over, its that vs SHA-512

    You should use bcrypt. It’s the best option for password hashing for now.

    and people say use a random salt and save it in your database which is stupid

    No it is not stupid. Salting passwords prevents an attacker creating a rainbow table for all your passwords. ircmaxell has created a password lib for your convenience which can be found on GitHub.

    Some related articles and Stack Overflow posts:

    • Are there more modern password hashing methods than bcrypt and scrypt?
    • bcrypt FAQ
    • Enough With The Rainbow Tables: What You Need To Know About Secure Password Schemes
    • How do you use bcrypt for hashing passwords in PHP?
    • Introducing: PasswordLib
    • Properly Salting Passwords, The Case Against Pepper
    • OWASP Password Storage Cheat Sheet

    Update

    When PHP 5.5 will be released it will introduce an easy way to correctly encrypt your passwords. It will use bcrypt by default and automatically add a salt to your passwords. When a better algorithm will become available in the future (e.g. scrypt) it will be able to use that. For more information see the RFC about this new feature. It will also have a feature which detects the used algorithm of the currently hashed passwords and automatically can update them when users login to a newer (/ safer) algorithm when available. For implementation examples check out this GitHub gist.

    If you are still on an older version of PHP and cannot update there is a pure PHP implementation of the C API available with support of PHP >= 5.3.7. This compat API uses the exact same implementation as the C API.

    Note: it would even be better to use the safer scrypt, however up till now PHP doesn’t support it. If it does at some point I will update this answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that this topic was discussed there a lot of times, but I've
I know that this topic has been already beaten enough, but I still don't
I know this is a recurrent/classical topic but I did not found anything that
I know this topic is asked before but they were not about jqueryui. Therefore
I know this topic has been beat to death but a lot of the
ok, I know that this topic has been addressed several times on here, but
I know this topic has been discussed a lot , but I have a
I know that this topic has been beaten to death, but it seems that
I know there's a lot of questions about this topic but I have not
I know this topic was descibed few times so far, but here is mine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.