Skip to content

Instantly share code, notes, and snippets.

View stevebaldwin21's full-sized avatar

Steve Baldwin stevebaldwin21

View GitHub Profile
@stevebaldwin21
stevebaldwin21 / Symfony2PasswordEncode.js
Created December 3, 2018 12:06 — forked from konstantinzolotarev/Symfony2PasswordEncode.js
Function for node.js that will encrypt password exactly like Symfony2 PHP framework. So all passwords from Symfony2 will work in your node.js application
'use strict';
var crypto = require('crypto');
var _ = require('lodash');
/**
* Will encrypt password in Symfony2 way using a given salt.
*
* @param {string} password
* @param {string} salt