V
V
Veiwai2021-10-23 16:39:11
Express.js
Veiwai, 2021-10-23 16:39:11

Express Mysql how to write password in SHA1?

There is a table in the database with a sha_pass_hash column.
In php, the password is generated there as follows

sha1(strtoupper($username).':'.strtoupper($password));

How can i do it in JS?
To work with the database I use https://www.npmjs.com/package/mysql

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2021-10-23
@SagePtr

https://www.google.com/search?q=nodejs+sha1

R
romaro, 2021-10-27
@romaro

Consider this method from the crypto package.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question