jarle/bun-skills/bun-guides-util-hash-a-password

Claude Code and agent skill by jarle/bun-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install jarle/bun-skills/bun-guides-util-hash-a-password

SKILL.md

The same SKILL.md was published earlier as jarle/bun-skills/bun-guides-util-hash-a-password.

Hash a password

The Bun.password.hash() function provides a fast, built-in mechanism for securely hashing passwords in Bun. No third-party dependencies are required.

ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const password = "super-secure-pa$$word";
const hash = await Bun.password.hash(password);
// => $argon2id$v=19$m=65536,t=2,p=1$tFq+9AVr1bfPxQdh6E8DQRhEXg/M/...

By default, this uses the Argon2id algorithm. Pass a second argument to Bun.password.hash() to use a different algorithm or configure the hashing parameters.

ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const password = "super-secure-pa$$word";
// use argon2 (default)
const argonHash = await Bun.password.hash(password, {
memoryCost: 4, // memory usage in kibibytes
timeCost: 3, // the number of iterations
});

Bun also implements the bcrypt algorithm. Specify algorithm: "bcrypt" to use it.

ts theme={"theme":{"light":"github-light","dark":"dracula"}}
// use bcrypt
const bcryptHash = await Bun.password.hash(password, {
algorithm: "bcrypt",
cost: 4, // number between 4-31
});

Use Bun.password.verify() to verify a password. The algorithm and its parameters are stored in the hash itself, so re-specifying configuration is unnecessary.

ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const password = "super-secure-pa$$word";
const hash = await Bun.password.hash(password);
const isMatch = await Bun.password.verify(password, hash);
// => true

See Docs > API > Hashing for complete documentation.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
9
Repository forks
1
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jarle/bun-skills/bun-guides-util-hash-a-password/badge)](https://verified-skill.com/skills/jarle/bun-skills/bun-guides-util-hash-a-password)

Something wrong with this skill or its page? Tell us.