---
title: "Bun v0.6.8"
description: "Bun v0.6.8 adds a built-in Bun.password API for argon2 (default) and bcrypt password hashing."
url: "https://swe.quest/articles/bun-v0-6-8-d3a463075fc8738e"
canonical: "https://bun.com/blog/bun-v0.6.8"
source: "Bun"
published: "2023-06-09"
difficulty: "medium"
kind: "Release"
reading_minutes: 7
tags: ["javascript","testing","runtimes","cryptography"]
---

# Bun v0.6.8

A post on [Bun](https://swe.quest/sources/bun.md), published 2023-06-09, 7 min read, Release. Original: [https://bun.com/blog/bun-v0.6.8](https://bun.com/blog/bun-v0.6.8)

## Summary

Bun v0.6.8 adds a built-in Bun.password API for argon2 (default) and bcrypt password hashing. It is built on Zig's std.crypto.pwhash and encodes the algorithm and parameters into PHC or Modular Crypt Format strings, so verify needs no extra metadata. bun:test gains mock(), spyOn, a jest.fn/jest.spyOn polyfill and toMatchObject, with mock creation benchmarked at roughly 80x faster than Jest. Other changes include a breaking bun:sqlite .values() change to return \[\] instead of null, an experimental WebSocket inspector speaking the WebKit debugger protocol, and fixes for CJS/ESM interop detection in lodash-es, the RegExp v flag and workspace lifecycle scripts.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)

## Prerequisites

- JavaScript runtimes ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Jest-style testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

Bun, Bun.password, bun:test, argon2, bcrypt, bun:sqlite, WebKit debugger protocol, lodash-es

## Related posts

- [Bun v1.2.6](https://swe.quest/articles/bun-v1-2-6-f72795d94f6eaf67.md): Bun · 2025-03-25 · Medium · 11 min read · JavaScript, Runtimes & VMs, Cryptography, Performance engineering
  Bun v1.2.6 fixes 74 bugs and rewrites more of node:crypto (Cipheriv/Decipheriv, DiffieHellman, ECDH, randomBytes) in native code on BoringSSL, with benchmarks showing AES-256-GCM going from ~1.15 ms to ~3.5 µs per iteration and scrypt from 365 ms to 47 ms. node:http compatibility work makes Express 9% and Fastify 5.4% faster.
- [Bun v1.1.16](https://swe.quest/articles/bun-v1-1-16-73af18d20e38e0ab.md): Bun · 2024-06-23 · Medium · 6 min read · JavaScript, Runtimes & VMs, Testing, Build systems
  Bun v1.1.16 fixes 41 bugs and adds lcov output for \`bun test --coverage\`, configurable in bunfig.toml.
- [Bun v0.6.13](https://swe.quest/articles/bun-v0-6-13-5f1989130c08b5c9.md): Bun · 2023-07-04 · Medium · 5 min read · JavaScript, Runtimes & VMs, Testing, Zig
  Bun v0.6.13 adds Date mocking in bun test via setSystemTime, which affects Date.now(), new Date() and Intl.DateTimeFormat without mutating the Date object as Jest does.
- [Bun v1.2.21](https://swe.quest/articles/bun-v1-2-21-6b251a5a24ec2faf.md): Bun · 2025-08-25 · Medium · 12 min read · JavaScript, Runtimes & VMs, Databases, Build systems, Supply chain security
  Bun v1.2.21 extends Bun.SQL into a unified, zero-dependency client for MySQL/MariaDB (via a driver written in Zig), SQLite and PostgreSQL using the same tagged-template API.
- [Bun v1.0.12](https://swe.quest/articles/bun-v1-0-12-7e77f90bbca6622e.md): Bun · 2023-11-16 · Medium · 12 min read · JavaScript, Runtimes & VMs, Testing, Developer tools
  Bun v1.0.12 fixes 24 bugs and adds \`bun -e\` for evaluating inline scripts (with TypeScript, JSX and top-level await), \`--env-file\` for choosing which .env files to load, \`server.url\`, \`import.meta.env\`, and \`expect.unreachable()\` in bun:test.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
