---
title: "BCrypt Hash Generator | iamthana"
description: "สร้าง bcrypt hash จากรหัสผ่าน และตรวจว่ารหัสผ่านตรงกับ hash หรือไม่"
canonical_url: "https://iamthana.com/tools/bcrypt-generator"
meta:
  "og:description": "สร้าง bcrypt hash จากรหัสผ่าน และตรวจว่ารหัสผ่านตรงกับ hash หรือไม่"
  "og:image": "https://iamthana.com/_og/s/o_f6ab13f41df2adb7.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "BCrypt Hash Generator | iamthana"
  "twitter:image": "https://iamthana.com/_og/s/o_f6ab13f41df2adb7.png"
---

> Index of every page on this site: [llms.txt](https://iamthana.com/llms.txt)

# **BCrypt Hash Generator**

สร้าง bcrypt hash จากรหัสผ่าน และตรวจว่ารหัสผ่านตรงกับ hash หรือไม่

**รหัสผ่าน**0 ไบต์

**Cost**1,024 รอบ

พิมพ์รหัสผ่าน แล้ว hash จะขึ้นที่นี่

## **หน้าตาของ hash**

hash ยาว 60 ตัวอักษร เริ่มด้วยเวอร์ชันเช่น $2b$ ตามด้วย cost สองหลัก salt 22 ตัว และผลคำนวณ 31 ตัว เครื่องมือนี้สร้างเป็น $2b$ เสมอ ส่วนการตรวจรับ $2a$ $2b$ และ $2y$

salt สุ่มใหม่ทุกครั้ง รหัสผ่านเดิมจึงได้ hash คนละค่าทุกรอบ การตรวจต้องเอา salt จาก hash เดิมมาคำนวณใหม่แล้วเทียบ ไม่ใช่เทียบข้อความ hash ตรง ๆ

## **cost และข้อจำกัด**

cost คือเลขชี้กำลังของจำนวนรอบ เพิ่ม 1 งานก็เพิ่มเป็นสองเท่า ไลบรารีรับ cost 4 ถึง 31 เครื่องมือนี้ให้สร้างได้ถึง 16 และตรวจ hash ได้ทั้งช่วง

bcrypt ใช้รหัสผ่านแค่ 72 ไบต์แรกในรูป UTF-8 รหัสผ่านสองอันที่ 72 ไบต์แรกเหมือนกันจึงตรวจผ่านกับ hash เดียวกัน

เวลาที่แสดงเป็นเวลาจริงบนเครื่องนี้ ไลบรารี bcryptjs เป็น JavaScript ล้วน README ระบุว่าช้ากว่าเวอร์ชัน C++ ราว 30% เวลาบนเซิร์ฟเวอร์จริงจึงต่างจากที่เห็น

## **เครื่องมืออื่น ๆ**

- [Security**★ ใหม่ล่าสุด**

  hsts ........ OK

  csp ........ MISSING

  x-frame ..... OK

  referrer .... OK<h3>**HTTP Security Header Checker**</h3>

  ตรวจ HTTP Security Headers ของ URL หรือ header ที่วางเอง พร้อมค่าที่ OWASP แนะนำให้ตั้ง](https://iamthana.com/tools/http-security-header)
- [Security

  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV\_adQssw5c<h3>**JWT Decoder**</h3>

  ถอดรหัส JSON Web Token เพื่อดู Header, Payload และเวลาหมดอายุ โดยไม่ตรวจลายเซ็น](https://iamthana.com/tools/jwt-decoder)
- [Security

  k7#Qm2-vR9!xLp4w

  length 16<h3>**สุ่มรหัสผ่าน (Password Generator)**</h3>

  สุ่มรหัสผ่านด้วย crypto.getRandomValues เลือกความยาวและชนิดตัวอักษรได้ พร้อมแสดงเอนโทรปีเป็นบิต](https://iamthana.com/tools/password-generator)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://iamthana.com/#website","@type":"WebSite","inLanguage":"th-TH","name":"iamthana","url":"https://iamthana.com/","publisher":{"@id":"https://iamthana.com/#identity"},"workTranslation":[]},{"@id":"https://iamthana.com/tools/bcrypt-generator#webpage","@type":"WebPage","description":"สร้าง bcrypt hash จากรหัสผ่าน และตรวจว่ารหัสผ่านตรงกับ hash หรือไม่","name":"BCrypt Hash Generator","url":"https://iamthana.com/tools/bcrypt-generator","breadcrumb":{"@id":"https://iamthana.com/tools/bcrypt-generator#breadcrumb"},"isPartOf":{"@id":"https://iamthana.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://iamthana.com/tools/bcrypt-generator"]}]},{"@id":"https://iamthana.com/#identity","@type":"Person","alternateName":"Thana Tingprasom","name":"iamthana","url":"https://iamthana.com","knowsAbout":["AI","SEO","Development","Homelab","Software Development","Python","Ubuntu","Docker"],"sameAs":["https://github.com/iamthana","https://www.linkedin.com/in/thana-tingprasom/","https://www.facebook.com/kttkook"]},{"@id":"https://iamthana.com/tools/bcrypt-generator#webapplication","@type":"WebApplication","applicationCategory":"UtilityApplication","applicationSubCategory":"Security","browserRequirements":"Requires JavaScript","description":"สร้าง bcrypt hash จากรหัสผ่าน และตรวจว่ารหัสผ่านตรงกับ hash หรือไม่","inLanguage":"th-TH","isAccessibleForFree":true,"name":"BCrypt Hash Generator","operatingSystem":"Any","url":"https://iamthana.com/tools/bcrypt-generator","author":{"@id":"https://iamthana.com/#identity"},"offers":{"@type":"Offer","price":"0","priceCurrency":"THB"}},{"@id":"https://iamthana.com/tools/bcrypt-generator#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://iamthana.com","position":1},{"@type":"ListItem","name":"Tools","item":"https://iamthana.com/tools","position":2},{"@type":"ListItem","name":"BCrypt Hash Generator","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://iamthana.com/sitemap.md) for all pages.
