Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot General Programming Having problems with SHA1 storing and loading password

 
  • 0 Vote(s) - 0 Average
Having problems with SHA1 storing and loading password
Th3CrazzyRabbit
Offline

Burgershot Member
Posts: 3
Threads: 1
Joined: Apr 2020
Reputation: 0
Location: Albania
#1
2020-04-18, 09:56 PM
Well to be honest its first time a costumer asked me for a SHa1 store and load from database as its not that safe anymore , myself i use bcrypt all the time.

However im trying to come together with this  login / signup system and at signup everything works perfectly , sha1 encrypts it and stores it to the database

Now the issue its the loading from database , even tho i write the same password it still doesnt work

this is the code from loading the Sha1

PHP Code:
$hashpass = sha1($userpass);
 
               if (password_verify($hashpass, $row['password']))
               {
                   session_start();
                   $_SESSION['userid'] = $row['Master_ID'];
                   header("Location:../index.php?login:sucess");
               }
               else{
                   header("Location:../login.php?error:wrongpassword");
                   exit();
               } 



Storing

PHP Code:
$hashedpass = sha1($password);
 
                       mysqli_stmt_bind_param($stmt, "sss", $username, $email, $hashedpass);
                       mysqli_stmt_execute($stmt);
                       header("Location:../index.php?Signup:Sucessful"); 


Help me pelase , i really need this.
« Next Oldest | Next Newest »



Messages In This Thread
Having problems with SHA1 storing and loading password - by Th3CrazzyRabbit - 2020-04-18, 09:56 PM
RE: Having problems with SHA1 storing and loading password - by BigETI - 2020-04-18, 10:25 PM
RE: Having problems with SHA1 storing and loading password - by Y_Less - 2020-04-18, 11:10 PM
RE: Having problems with SHA1 storing and loading password - by Th3CrazzyRabbit - 2020-04-18, 11:20 PM
RE: Having problems with SHA1 storing and loading password - by Y_Less - 2020-04-19, 11:40 AM
RE: Having problems with SHA1 storing and loading password - by Th3CrazzyRabbit - 2020-04-19, 12:19 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode