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

Unable to install bcrypt on ubuntu 20.04

My project has ruby 2.6.5, rails 6 and when i tried to run bundle install, bcrypt gem is not installing. I tried sudo apt-get install ruby-dev and sudo apt-get install build-essential commands to resolve the issue and they were not helpful. Any one…
Mahesh Babu
  • 137
  • 1
  • 10
0
votes
0 answers

understanding php's blowfish check

We have a php code base that calls crypt function as of now using the blowfish algorithm. We have some passwords that seem to contain $ in their hashed salt component. e.g. $2y$10$XisdfsidnsdnisdaAA$$$.[hash_component] My…
silver-soul
  • 87
  • 1
  • 8
0
votes
2 answers

How does bcrypt "know" whether a given hash is associated with a given password?

Given a password P and hash H, the function bcrypt.compare(P, H) tells you whether or not H is a bcrypt hash of P. Question: How does bcrypt.compare do the above? It's mysterious to me since P may be associated with many different hashes, and bcrypt…
Asker
  • 1,299
  • 2
  • 14
  • 31
0
votes
1 answer

can we generate 16 bytes hash using bcrypt?

I am planning to use bcrypt library for hashing the password with a max length of 16 bytes, the standard bcrypt library is generating the hash of 31 bytes as per the below example: $2a$12$SBdXpoExjoJBtyVS3GBbh.VR4TlNWSrM0XRRDJjAw0fnw8TLhuDj6 Is it…
shreyas_patel21
  • 317
  • 1
  • 4
  • 14
0
votes
1 answer

Is there a practical difference between generate bcrypt salt and hash on separate function calls or auto-gen a salt and hash?

I honestly tried my best to find the answer here or anywhere else. Bcrypt documentation states that there are 2 techniques to hash/salt a password: Technique 1 (generate a salt and hash on separate function calls): bcrypt.genSalt(saltRounds,…
waway
  • 38
  • 6
0
votes
2 answers

@Autowired field is null after trying suggestions

I've been trying to encrypt passwords following the tutorial found here https://www.baeldung.com/spring-security-registration-password-encoding-bcrypt. I created my bean, but had the quite common problem that my autowired fields never got injected.…
Meg
  • 11
  • 4
0
votes
1 answer

Go unit testing Bcrypt

I am performing unit tests for a service where request dto's are validated and user passwords are hashed using Go's Bcrypt package before being passed to a repository for insertion into the DB. I don't know how my mock functions should return a…
Jeremy
  • 1,447
  • 20
  • 40
0
votes
2 answers

How to get plaintext from hashed text?

So, I'm working on a project where I'm storing passwords in a mongoDB and using Python. Python do has bcrypt build-in module which allows us to hash a plaintext. Now, I can hash a password and store the hashed password in database. Cool. And If I…
Alok Singh
  • 29
  • 1
  • 4
0
votes
1 answer

bcrypt cost 1 blank hash?

i want the crypt-formatted bcrypt hash for a blank password with cost 1, but the api i'm using to hash these passwords refuse to generate a hash with a cost below 4 (for obvious reasons), what does a cost 1 password look like? for completeness,…
hanshenrik
  • 19,904
  • 4
  • 43
  • 89
0
votes
1 answer

bcrypt different hash for same string?

I have created users in mysql with the same password then this code snippet changes the plain text passwords to a hash using bcrypt. Why is the hash different for the same string? import mysql.connector import bcrypt mydb =…
0
votes
1 answer

bcrypt.compare ( ) always returning false

I have tried both bcrypt (version 5.0.0) and bcryptjs (version 2.4.3) to hash and compare passwords. But the compare function in both the packages always returns false. Hashing userSchema.pre('save', async function (next) { this.password = await…
Sachin Yadav
  • 128
  • 3
  • 12
0
votes
1 answer

What is the most appropriate JSON-serialisable type to use here?

Hi there developer folks, I'm trying to write a little proof-of-concept program on repl.it which stores credentials securely using BCrypt. To save myself faffing with SQL, I'm prototyping using the built in repl.it database to store credentials. The…
gwood
  • 23
  • 4
0
votes
1 answer

Why bcrypt fails when MongoDB versionKey "_v" is changed?

I'm trying to implement an authentication flow in Nodejs. I'm using MongoDB as database and there is a problem with 'bcrypt password hashing' and 'mongoose document versioning'. When I create a new account and login with this account, there is no…
orhanors
  • 9
  • 5
0
votes
2 answers

how to compare bcrypt hash password

I am new to node js, I am trying to validate a password that is encrypted, and I have given the below code which I have tried. async function passCheck(event) { // in event i am passing user entered password and email var EnteredPassword =…
kp97338
  • 29
  • 2
  • 10
0
votes
1 answer

Spring Security: BCryptPasswordEncoder works without matter if the Version and Strength values are changed

With Spring Boot CLI is possible do the following: spring encodepassword secret Where that command prints {bcrypt}$2a$10$ZjFpLGhApSqM1ftCBOPvt.3aV3l5dsRawW61ZCX2lbIqRq6afgzk6 Therefore the password secret is encoded to…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158