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 9160661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:47:27+00:00 2026-06-17T13:47:27+00:00

Possible Duplicate: Secure hash and salt for PHP passwords Iv’e read a lot of

  • 0

Possible Duplicate:
Secure hash and salt for PHP passwords

Iv’e read a lot of posts both in stackoverflow and other websites talking about web security. Such as salting encrypting etc. And I’m kinda not getting it so a simple explanation would be really helpful.

So here’s what I know so far. A user logs in types his username and password. The input then goes through a process. Lets say the username and password is combined like for example:

$username = (USERS USERNAME INPUT);
$password = (USERS PASSWORD INPUT);
$userinput = $username . $password;

Then we add some salt.

$salt1 = "13$13aVc!kd";
$salt2 = "4kr$!vlmeoc";

$salted = $salt1 . $userinput . $salt2;

Then we encrypt it.

$encrypted = encrypt($salted);

Then check with the database and if its right user gets logged in.

That’s how it works right? But Iv’e read about brute force attack. It guesses the input values right? With the procedure above. Doesn’t it shows that the attacker only needs to get the $userinput information correct to get in? He doesn’t need to guess the long $encrypted string correct?

Note: Lets say in this situation there’s no captcha, no number of tries limit, no lockout, nothing else but the one above.

Note: Be gentle I’m still learning.

  • 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-17T13:47:28+00:00Added an answer on June 17, 2026 at 1:47 pm

    If you rule out captchas, try limits, lockouts, et cetera… then yes. You just have to brute force the plain text string.

    However, that does take time – at the very least, it’s bounded by the rate at which the server will respond to login requests. Even if the developer doesn’t add any measures to prevent brute forcing, the server itself can only go through the encryption + verification process so quickly, and can only handle so many parallel requests.

    That said, this is why it’s important to

    • As a user, use a strong, hard to brute-force password
    • As a developer, have adequate measures to prevent brute-forcing of your login process

    Hashing and salting passwords isn’t to protect against people who brute force the natural login process (there are other things that protect against that). Instead, they’re to protect against potential compromise of the password storage itself (e.g. someone dumping the contents of the database).

    Both hashing and salting serve to decrease the speed at which someone with access to the stored passwords can retrieve the plain text string they’d need to be able to go through the natural login process (of your site or other sites, given that passwords are commonly shared between sites) without tripping anti-brute-forcing security measures.

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

Sidebar

Related Questions

Possible Duplicate: Secure hash and salt for PHP passwords WARNING Don't use MD5 for
Possible Duplicate: Secure hash and salt for PHP passwords I try to create a
Possible Duplicate: Secure hash and salt for PHP passwords THREE part question: Which technique
Possible Duplicate: Secure hash and salt for PHP passwords I use the following code
Possible Duplicate: Secure hash and salt for PHP passwords I saw someone coding a
Possible Duplicate: Secure hash and salt for PHP passwords I am making a website,
Possible Duplicate: Secure hash and salt for PHP passwords Alright so im thinking of
Possible Duplicate: Secure hash and salt for PHP passwords What is the best way
Possible Duplicate: Secure hash and salt for PHP passwords I am making a system
Possible Duplicate: Best way to encode passwords in PHP I've been reading a lot

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.