Questions tagged [bcrypt]

bcrypt is an implementation of the Blowfish cipher and a computationally-expensive hash function mostly used for password hashing.

bcrypt is an implementation of the Blowfish cipher and a computationally-expensive hash function mostly used for password hashing.

Resources

2290 questions
0
votes
1 answer

spring security Encoded password does not look like BCrypt

I'm building MVC with Spring Security My SecurityConfig: @Configuration @Slf4j public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired BCryptPasswordEncoder…
maw2be
  • 91
  • 2
  • 12
0
votes
2 answers

Authentication with bcrypt and jwt does not work

I am quite new to Node.js / Express and development of web apps. I try to do a simple user registration where I hash the password with bcrypt before saving the hash to mongodb. The login form, which should allow a user to login, does subsequently…
Patrick
  • 21
  • 1
  • 7
0
votes
0 answers

Query a string hashed with bcrypt on MySQL database

I need to query a serial number on a MySQL database, because of the sensitivity of this serial number it's stored as a bcrypt hash in the database. The hash is generated with a random salt which is default behavior from the password_hash()…
Edelweiss
  • 80
  • 9
0
votes
1 answer

Python bcrypt: how to check a long encrypted by sha256 password?

I have a long password I want to encode. I use the bcrypt main tutorial: >>> password = b"an incredibly long password" * 10 >>> hashed = bcrypt.hashpw( ... base64.b64encode(hashlib.sha256(password).digest()), ... bcrypt.gensalt() ...…
Minh-Long Luu
  • 2,393
  • 1
  • 17
  • 39
0
votes
0 answers

Bcrypt vs Script Crypto Which One is Most Secure

I am new to Nodejs. I am confused Which One Should i choose i get this code from - here I dont have more knowledge about this stuff. Help me for better Understanding const crypto = require("crypto") async function hash(password) { return new…
0
votes
1 answer

Password not saved into database bcrypt nodejs

I'm trying to make an login/signup system with authentication. Im using Nodejs with bcrypt to encrypt the data. My problem is that the hashed pw does not get stored into the DB. Here is my signup route, router.post('/signup', (req, res, next) => { …
haycon
  • 25
  • 8
0
votes
1 answer

Is there a way to use bcrypt algorithm version 6?

With the crypt() function in a C program, I got the following hash for the password "toto": $6$QSX8hjVa$Oj9IAu50jSsAAm62MOo63Ea4p1o8DC0zcR6I8N5f4jRgE0Bv0WRFEJwO4hGxAAMyOF2ON5Dwze2InWV9nDWVm1 However, when using the following code, I have an…
hacb
  • 175
  • 2
  • 10
0
votes
2 answers

C# Bcrypt.net-next Nuget assemblyname?

I code a Login so i need to Hash my Password whit BCrypt. I use the Nuget Package for BCrypt.Net-Next. i Follow the Tutorial to Hash the Passwort for the Login but i get a arror thet the assembly reference missing is. I try: using BCrypt; using…
Chieko
  • 11
  • 3
0
votes
0 answers

why these 2 strings are identical for bcrypt?

refreshToken is a string that is checked to see if it is in line with encoding. currentHashedRefreshToken is currently an encoded token. isRefreshTokenMatching is a boolean variable that compares if the encoded string matches bcrypt. { …
regexjS2
  • 41
  • 4
0
votes
2 answers

Nestjs: Validate user password for signin - Error: data and salt arguments required

I'm trying to validate user password and using nestjs, mongoose & bcrypt. I'm getting Error: data and salt arguments required when I entered wrong password. validatePassword function is to compare whether user password and hash is matched. Can…
Johnny
  • 261
  • 7
  • 22
0
votes
1 answer

Invalid Credentials Bcyrpt.compare()

const express = require('express'); const router = express.Router(); const auth = require('../../middleware/auth'); const bcrypt = require('bcryptjs'); const jwt = require('jsonwebtoken'); const config = require('config'); const { check,…
tryingToBeBetter
  • 365
  • 1
  • 6
  • 16
0
votes
1 answer

Why does bcrypt compare always return false

Every time I try to login bcrypt compare returns false but the registration works. Here is the code for login : async function init(passport){ const authenticateUser = async (email,password,done) => { const user = await User.findOne({email :…
Winston Brown
  • 97
  • 1
  • 5
0
votes
0 answers

My password is not getting hashed and unable to compare using bcrypt

I'm trying to build a todo app where It has a signup and sign in page for which I'm trying to hash the password and compare the same when a user tries to login. Initially with bcrypt sync method I was able to hash the password however my Scompare…
0
votes
0 answers

Dehash Bcrypt hashSync

So lets say I have this var hashedApi = bcrypt.hashSync(req.body.api_token, 8); Then I want to be able to later dehash the API token and use it later to verify a user. How would I go about dehashing the API token to use later? Thank you
0
votes
0 answers

Error: data and hash must be strings in login

I checked my code with postman and it gives this error (node:6548) UnhandledPromiseRejectionWarning: Error: data and hash must be strings at Object.compareSync (H:\Chale\Angular Projects\mean-mysql-login-reg\node_modules\bcrypt\bcrypt.js:170:15) at…
Kamalka Fernando
  • 153
  • 1
  • 2
  • 13