Questions tagged [bcrypt]
bcrypt is an implementation of the Blowfish cipher and a computationally-expensive hash function mostly used for password hashing.
2,169
questions
0
votes
0
answers
11
views
Docker Failed - bcrypt_lib.node: Exec format error
I have tried to create a docker image of my backend API.
but getting errors. I have googled about it, and everyone who has the same issue had to add node_module on the .dockerignore file.
I already ...
0
votes
1
answer
11
views
Hashing token using bcrypt and verify it by hashing the secret string again
As I understand, having the token in plain text in the Database is not secure, if an attacker gets the tokens that I use for changing the user passwords and verifying the email, then they could do all ...
2
votes
2
answers
29
views
Passwords are not being encrypted in MYSQL
I am currently trying to use bcrypt to encrypt/hash my passwords from my seeds and store them in MYSQL but it keeps giving me the same password. I am using python. Any help would be appreciated!
User....
0
votes
2
answers
39
views
BcryptEncoder configuration in Spring Security Configuration
So I'm creating this restservice but I am struggling with the encoderconfiguration.
I created a config class to set the passwordencoderBean, as instructed in replies below.
My code compiles. But when ...
1
vote
1
answer
24
views
bcrypt crashing node_modules
I'm currently building a react native app using typescript and when after running npm i bcrypt node_modules crash and says the error below:
ERROR in ./node_modules/@mapbox/node-pre-gyp/lib/util/nw-...
0
votes
0
answers
13
views
I am using bcryptjs to hash my password so I got an error but in catch(err) don't give me any error
this is the controller and if I do it whitout hashing it works but with hashing it give me an error and I cannot handle in catch(err)
this is the controller and if I do it whitout hashing it works but ...
1
vote
2
answers
49
views
How do I get the value of an Array without knowing the name of the Array
im currently working on a user authentication system using expressJS. Therefore to encrypt my data I am using bcrypt. Then I save the encrypted data to a MySQL Database. Then when logging in I get the ...
0
votes
1
answer
39
views
Go x/crypto/bcrypt: Using a custom salt when generating the password hash
I am trying to implement a basic authentication system for a Go server that consists of users with multiple server-generated passwords (tokens essentially) which must be securely stored in a database.
...
0
votes
0
answers
47
views
Facing Issue with BCRYPT Module In Python
This is for my school project.
I made a function to encrypt functions using bcrypt in python. Now the encryption is fine and I can store it. But it shows error while checking the hashed code.
def ...
0
votes
1
answer
33
views
Npm install failing because of bcrypt error
I deleted my node_modules folder in order to fix a previous error and now I'm stuck in another one and another one, I've even forgotten the initial error. Every time I try to run npm install or try to ...
1
vote
1
answer
31
views
same salt, same password, different results (bcrypt)
I'm using bcrypt with Node.js and the hash comes out different each time, even using the same salt. This is my code:
const bcrypt = require('bcrypt');
let saltRounds = 1;
let salt = bcrypt....
0
votes
1
answer
12
views
With async the bcrypt.hash function returns undefined but it works fine with .then
Here is the code with async (returns undefined)
userService.register = (username, password) => {
return bcrypt.hash(password, saltRounds, async(err, hash) => {
const newUser = new user({
...
1
vote
0
answers
52
views
hashedPassword is not the hash of the given password [closed]
I am getting the following response when trying to Compare the hash and the password: "hashedPassword is not the hash of the given password". Neither incomming_admin, nor user are nil. I've ...
0
votes
0
answers
23
views
Bcrypt compare is not working in properly nodejs
I am building an register and login system with nodejs. but when I try to bcrypt compare in both register and login, both of them not working. here is my code
const express = require('express')
const ...
0
votes
0
answers
17
views
Illegal arguments: string, undefined when login user
I got these errores when I try to post the http://localhost:3000/sign url with mysql
Error: Illegal arguments: string, undefined
at _async (C:\Users\19522\Qstt-website\Đồ án TKCSDL\code BE\...
0
votes
1
answer
25
views
Does saltRounds improve security?
I had to hash my password, for that i used bcrypt.
By following a tutorial, i found this code :
const saltRounds = 10;
bcrypt.hash(password, saltRounds).then(hashedPassword => {
//...
}
I ...
3
votes
1
answer
78
views
Rebuild/Verify Ruby on Rails Bcrypt password hash in Javascript
I have to rebuild a project from Ruby on Rails to Node.js.
Bcrypt was used to hash passwords in the Ruby project and I'm trying to rebuild the same hash so I can copy the hashed password and users can ...
0
votes
0
answers
22
views
Bcrypt Error: data and hash arguments required | Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
I keep getting these 2 error, no matter what:
Error: data and hash arguments required & Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
I get the first error ...
0
votes
1
answer
32
views
Spring Boot BCryptPassword Authentication
I have a simple controller for user authentication:
@RestController
@RequestMapping("/auth")
public class UserController {
private final UserService userService;
@Autowired
...
1
vote
1
answer
75
views
referenceerror: cannot access 'user' before initialization
error showing: referenceerror: cannot access 'user' before initialization , I encored the password, after I called use, or there is an error will come like ***hashedPassword is not defiend *** so ...
0
votes
0
answers
18
views
Bcrypt password reset not taking but rest of function works
I'm on the final step of my password reset workflow and am experiencing a weird issue where the code runs successfully, prints out my artist document as well as the words "Successfully ...
0
votes
0
answers
24
views
Why the Passport-JWT doesn't accept the bcrypt generated key?
I have created my keys using require('crypto').randomBytes(64).toString('hex') command as following:
ACCESS_TOKEN-SECRET=9a57db9226a................bc6bc7735204a13fb471
REFRESH_TOKEN_SECRET=a387368854....
0
votes
1
answer
39
views
Spring Boot Password Encoding
I am new to Spring boot and I am trying to configure the security for my api. I am using PasswordEncoding:
public static String encodePassword(String plainPassword){
BCryptPasswordEncoder ...
0
votes
2
answers
47
views
Bcrypt compare password stays invalid even is password is correct on login
I'm trying to compare a password from my database with the password on login.
req.body.wachtwoord is the password send to the API to check.
results.0.wachtwoord is the hashed password in the database.
...
0
votes
3
answers
34
views
Password reset not saving to database
My code above runs without any errors but the new password isn't saved.
I've been following the bcrypt docs, a blog post and a video and think the three different sources have resulted in my missing ...
0
votes
0
answers
38
views
Mongoose Schema and TypeScript: cloneObject Error ->max call-stack exceeded
Learning typescript and incorporating it into a server component that worked while in good old JavaScript.
But I've come across this error when trying to run the server:
C:\Users\Documents\...
0
votes
0
answers
36
views
laravel password hash in seed doesn't match the one login
on the seeder I've used \Hash::make('password'); on login I've used this on login controller .
protected function credentials(Request $request)
{
return array_merge($request->only($this-...
-3
votes
1
answer
31
views
What is the meaning of bacon and not_bacon in the README of bcrypt.js?
It's Part of the Code-Examples in the README-File.
"B4c0/\/" stands for 'password_example' I found out from another question here.
What means 'bacon' and 'not_bacon'?
To check a password:...
0
votes
0
answers
31
views
-- npm i bcrypt -- doesn't work. I can't install it, I tried to install the previous version but I have the same resutat
$ npm i bcrypt
npm ERR! code 1
npm ERR! path C:\Users----\Documents----\12 - Authentication &
Security\1 -- First Step __ Secrets\node_modules\bcrypt
npm ERR! command failed
npm ERR! command C:\...
1
vote
1
answer
42
views
bcrypt password is changing after a time
I have created a app similar to blog app. Users can registered and login logout. When User creates it's account than logout than s/he can login again with the same password. However, after a spesific ...
0
votes
2
answers
107
views
bcrypt compare is not working, login success not getting
through the sign up form I insert name , password and email in the DataBase and the password is encrypted it is successful. but, i created a login form through that i inserted the same email and same ...
0
votes
1
answer
64
views
Promise { <pending> } React bcrypt hashing the Password [duplicate]
I am creating a Login/Registration Form Using Nodejs. I am hashing the password entered by the user using bcrypt.js but when I assign the password to a variable so that I push that to the database I ...
-1
votes
1
answer
42
views
How to fix "can not fin'd bcrypt" in NestJS?
As found in this SO-answer, the following thing could be a way how to encrypt a password into a hash:
@BeforeInsert() async hashPassword() {
this.password = await bcrypt.hash(this.password, ...
0
votes
2
answers
79
views
for salt and hashing passwords i used Bcrypt method but its showing , error = new Error('data and salt arguments required');
for salt and hashing passwords i used Bcrypt method but its showing ,
error = new Error('data and salt arguments required');
i think my code have the problem please i need help please;
eCommerce ...
0
votes
1
answer
24
views
Err:data and salt arguments required
connectde with datadase (mongodatabase)
and chik if email == new email!
and used bcrypt to do securty password.
exports.createNewUser = (username, email, password) => {
return new Promise((...
0
votes
1
answer
25
views
migrating b-crypt hashed passwords from Ruby on Rails to Wordpress
I have an application with user table and hashed passwords created by Devise in a RubyonRails website.
I want to migrate those users to Wordpress.
According to PHP documentation you can use the BCRYPT ...
0
votes
1
answer
30
views
Mern stack bcrypt password works many times, and suddenly doesn't match
i have a strange problem and don't find the same so i search some help :) :
I make a mern stack social media, and first all is okay with register new user and logged in.
I'm on development of the app, ...
0
votes
0
answers
39
views
Firebase Bcrypt Issue
I'm trying to run my web app locally using the firebase emulator suite. However, I keep getting an issue that seems to be caused by bcrypt and Apple M1. Here are some of the things I've tried to ...
1
vote
0
answers
33
views
Bcrypt compare method is not returning true when hash password is stored in the database
userSchema.statics.findByCredentials = async (email, password) => {
const user = await User.findOne({ email })
if (!user) {
throw new Error('no user found!')
}
const ...
1
vote
2
answers
594
views
Argument of type 'Promise<unknown>' is not assignable to parameter of type 'void'.ts(2345) - mockReturnValueOnce
The method mockReturnValueOnce is showing Argument of type 'Promise' is not assignable to parameter of type 'void'.ts(2345).
I already tried like this:
.spyOn(bcrypt, 'hash')
.mockImplementation(...
0
votes
0
answers
20
views
Unable to encrypt password when updating bcrypt?
I want to update a customer's information that consists of first name, last name, email and password. I want to encrypt the password when its being updated. I wrote my route like this:
customerRouter....
1
vote
0
answers
26
views
Assistance with figuring out npm install bcrypt error code 127
I'm trying to install bcrypt using npm install -g bcrypt but I get an error code 127. I am completely new to anything npm related so I am a little out of my depth. Can someone please explain to me ...
3
votes
1
answer
37
views
Can the crypto module replace bcryptjs and jsonwebtoken, and would you recommend it?
I know that the crypto module is fairly new but from what I've seen it's quite powerful and could do what these two packages are able to. Can't this module just replace these two packages or am I ...
1
vote
0
answers
30
views
function logic for password verification using bcrypt that is getting a double render error
working on a Passwords_Controller that allows the password to be changed, also validates if the user is using same password, or if they are trying to use different password, and another password to ...
0
votes
1
answer
17
views
Installing bcrypt on ubuntu error message node api version
I'm trying to install bcrypt using sudo npm install -g bcrypt but keep getting the following errors and i am not sure how to solve them. My npm version is 2.14.3 and node.js version is 3.3.1. I think ...
0
votes
0
answers
111
views
Why don't my hashes match? (bcrypt, fastAPI)
Basically, I'm using fastAPI login Manager to do auth, but i'm comparing hashes using bcrypt.
The issue i'm having is that bcrypt's check password function isn't working as excepted. (To Elaborate)
I ...
0
votes
1
answer
135
views
How to use bcrypt hash on the browser side?
I'm already using bcrypt.hashSync() on the NodeJS server side (included with NPM), but I can't use it on the browser side: the 'bcrypt' object is undefined when I call it with:
<script src=&...
0
votes
0
answers
8
views
I am trying to define some methods for my User schema but all of them are throwing that the method is not a function
This is my first ever question on SO , so please forgive me incase of question format :)
in Schema
UserSchema.pre('save' , async function (next){
this.password = await bcrypt.hash( this.password ,...
0
votes
0
answers
40
views
Fix my encrypt password it's truncated MySql database
I'm trying cryptograph my field password using bcrypt, a module of javascript, but when i try register some user, this erro appears:
"Data truncated for column 'password' at row 1"
I'm ...
0
votes
0
answers
34
views
Code inside the catch block is being executed even after successful login and completion of try block
Front end(login.js)
const login = async (e) => {
e.preventDefault();
try {
const response = await loginUser({
email,
password,
});
console.log("Login ...