Published
Edited
Nov 27, 2019
Insert cell
md`# PBKDF2 in JavaScript and Python`
Insert cell
forge = require("https://unpkg.com/node-forge@0.7.0/dist/forge.min.js")
Insert cell
// salt = forge.random.getBytesSync(32);
salt = 'salt'
Insert cell
hashed_password = forge.pkcs5.pbkdf2('this is my password', salt, 10000, 32, forge.md.sha256.create());
Insert cell
btoa(salt)
Insert cell
btoa(hashed_password)
Insert cell
btoa(hashed_password).length
Insert cell
btoa(salt) + ":" + btoa(hashed_password)
Insert cell
forge.md.sha256.create();
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more