8 lines
200 B
TypeScript
8 lines
200 B
TypeScript
const password = process.argv[2]
|
|
|
|
if (!password) {
|
|
throw new Error('Usage: bun run scripts/hash-password.ts <password>')
|
|
}
|
|
|
|
console.log(await Bun.password.hash(password, {algorithm: 'argon2id'}))
|