How to compare Laravel encrypted passwords in node

Source: Internet
Author: User
The user part of the database is stored in laravel using the php framework. salt is a 64-bit date string encrypted with md5, and then calls the framework :: make method to generate the encrypted password. In another application, use node to get the salt and encrypted password, and try bcrypt and crypto respectively... the user part of the database is stored in laravel using the php framework. salt is a 64-bit date string encrypted with md5, and then calls the framework ::makeMethod to generate an encrypted password

In another application, I used node to get the salt and encrypted password, and tried bcrypt and crypto respectively, find out whether the specific implementation of the make method of lavarel and whether there is a corresponding module decryption in the node.

Thanks!

Reply content:

The user part of the database is stored in laravel using the php framework. salt is a 64-bit date string encrypted with md5, and then calls the framework::makeMethod to generate an encrypted password

In another application, I used node to get the salt and encrypted password, and tried bcrypt and crypto respectively, find out whether the specific implementation of the make method of lavarel and whether there is a corresponding module decryption in the node.

Thanks!

The storage of user passwords cannot be decrypted.

The password can only be used for authentication, that is, only one-way computing.

From the code, Laravel uses Bcrypt. The specific code is implemented in:

vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php

public function make(){ ... }

Use Basic PHP Functionspassword_hash().

Decryption should not be possible. For more information about how to verify the code, see the PHP document.

Md5 is a hash function and is irreversible.

For highly concurrent applications, it is best not to use password_hash encryption, which is very inefficient.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.