password-hash

Is still valid password hashing using md5 or sha1?

丶灬走出姿态 提交于 2019-12-13 16:14:05
问题 Just now I'm working in a financial project. Here, the team is thinking to use MD5 for password hashing . But, today is easy copy a SHA1 or MD5 password to decrypt, inclusive if they are complex password like: My$uper$ecur3PAS$word+448 , you might use a online page to decrypt it and there is it. Small and mid-range developers (including me) uses those hashing methods , but I think is not enough to provide security over the database. (Excluding firewalls , network security , iptables , etc.).

how can I make the password verify function work with $_POST

主宰稳场 提交于 2019-12-13 11:27:01
问题 I want to make an login system with password verify. I have encrypted my password with password default. I also stored the hash in the database. Now I want to use password verify to make an login system, but the function always reteruns a value of true. can someone explains why? And can someone explain me how I can use password verify with $_POST? code for the hash <?php /** * Created by PhpStorm. * User: jbosma * Date: 24/07/2018 * Time: 23:21 */ include_once "dbconnection.php"; if (isset($

What are the downsides of using my own hashing algorithm instead of popular ones available?

僤鯓⒐⒋嵵緔 提交于 2019-12-13 07:54:05
问题 I am a noob in algorithms and not really so smart. But I have a question in my mind. There are a lot of hashing algorithms available and those might be 10 times more complex than what I wrote, but almost all of them are predictable these days. Recently, I read that writing my own hashing function is not a good idea. But why? I was wondering how a program/programmer can break my logic that (for example) creates a unique hash for each string in 5+ steps. Suppose someone successfully injected a

How to verify a password using BCrypt

帅比萌擦擦* 提交于 2019-12-13 02:07:09
问题 How do I check if a user entered password matches a password that has been hashed and stored into a database by somebody else. Normally you would use this right?: bool value = BCryptHelper.CheckPassword("Tom123", passwordHash); So what if you don't have the passwordHash variable which contains the hashed password? I don't have a great understanding of how BCrypt works so I think I am missing something very simple. 回答1: Here is a hint to the answer. You can follow the link for further detailed

Salted Password Validation in PHP

我们两清 提交于 2019-12-12 17:29:06
问题 On crackstation.net it is stated: To Validate a Password Retrieve the user's salt and hash from the database. Prepend the salt to the given password and hash it using the same hash function. Compare the hash of the given password with the hash from the database. If they match, the password is correct. Otherwise, the password is incorrect. However in the source code listed at the bottom of the page, I can't figure out how the validate_password function takes into account the salt. I mean where

PHP 5.5 password_* functions re-hashing

妖精的绣舞 提交于 2019-12-12 10:26:50
问题 I have setup my password hashing using PHP password_* functions 1) password_hash($password, PASSWORD_BCRYPT, array("cost" => 11); 2) return password_verify($password, $hashedPassword)? true : false; Everything work fine. I found also password_needs_rehash() function, which tak 2 params, $hashedPassword and algorithm, example: password_needs_rehash($hashedPassword, PASSWORD_BCRYPT); I understand to use this when it's changed algorithm or cost, something like: if (!password_verify($password,

How can I pre-generate a BCrypt hashed password for my Spring Boot application?

我的未来我决定 提交于 2019-12-11 16:27:32
问题 I have a Spring Boot application (code here) with a security configuration that utilizes a BCryptPasswordEncoder: @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } I'd like to pre-generate a couple of passwords to initialize my database, for testing or for logging in on a developer machine. (Not for production.) My database is PostgreSQL and the schema is based on the Spring Security default schema, with a users table and an authorities table. My SQL

My login function is unable to match username and password stored in the database

南笙酒味 提交于 2019-12-11 14:09:48
问题 This code always returns wrong username and password though its right and same function works for my admin login system. It worked some time ago, and now it won't. function login($user,$pass,$accountType){ require('connection.php'); $result=mysqli_query($con,"select * From $accountType"); $regex="/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/"; if(preg_match($regex, $user)){ if(mysqli_num_rows($result)>0){ while($row=mysqli_fetch_assoc($result)){ $username=$row[

Understanding Liferay Password Encryption

时光怂恿深爱的人放手 提交于 2019-12-11 04:17:34
问题 About passwords encryption in liferay I found out that liferay is using PBKDF2WithHmacSHA1/160/128000 algorithm by default which generates 160 bit hashes using 128,000 rounds. And I can use the following types by applying them in my portal-ext.properties file #passwords.encryption.algorithm=BCRYPT/10 #passwords.encryption.algorithm=MD2 #passwords.encryption.algorithm=MD5 #passwords.encryption.algorithm=NONE #passwords.encryption.algorithm=PBKDF2WithHmacSHA1/160/128000 #passwords.encryption

password_hash function in php 5.5

与世无争的帅哥 提交于 2019-12-11 03:48:55
问题 i have the following function that hashes a password and stores it in a database. i am trying to use the password_hash function in php 5.5 but its giving me weird results. function hashpass($password) { include("includes/config.php"); $password = password_hash($password, PASSWORD_DEFAULT); return $password; } I then output the result for the same static password which i am just testing as "testpassword" and it keeps giving me different hashes. Why is that? if it keeps doing that i will never