This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let bcrypt = require('bcrypt-nodejs'); | |
let password = "hello"; | |
let stored_hash = ""; | |
// first generate a random salt | |
function genSalt(password) { | |
return new Promise((resolve,reject) => { | |
bcrypt.genSalt(10,function(err,salt) { | |
if (err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
const Title = ({ children }) => <h1 className="Title">{children}</h1> | |
const Section = ({ title, children }) => ( | |
<div className="Section"> | |
<Title>{title}</Title> | |
{children} | |
</div> |