Public
Edited
Mar 23, 2024
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
argon2.hash({
pass: password,
salt: salt,
time: 10, // rounds
mem: 1024, // used memory, in KiB
type: argon2.ArgonType.Argon2i // OWASP recommendation
});
Insert cell
Insert cell
configureGlobals = {
// This was the main gotcha with importing that module
window['argon2WasmPath'] = await FileAttachment("argon2.wasm").url()
window['loadArgon2WasmModule'] = async () => import(await FileAttachment("argon2.js").url())
}
Insert cell
Insert cell
encrypted = argon2.hash({
pass: 'password',
salt: 'somesalt',
time: 10, // rounds
mem: 1024, // used memory, in KiB
type: argon2.ArgonType.Argon2i
});
Insert cell
valid = argon2.verify({ pass: 'password', encoded: encrypted.encoded });
Insert cell
invalid = argon2.verify({ pass: 'password2', encoded: encrypted.encoded }).catch(err => err);
Insert cell
import { footer } from "@tomlarkworthy/footer"
Insert cell
footer
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