Monu Tools

สร้าง HMAC

สร้าง HMAC สำหรับข้อความและคีย์ความลับโดยใช้ SHA-1, SHA-256, SHA-384 หรือ SHA-512 ในเบราว์เซอร์ของคุณ

วิธีใช้ HMAC

  1. 01

    เลือก hash algorithm

  2. 02

    ป้อนคีย์ความลับและข้อความ

  3. 03

    คัดลอก HMAC ที่แสดงเป็น hex digest

Sign a message with a key

An HMAC generator that signs a message with a secret key using SHA-1, SHA-256, SHA-384 or SHA-512, and shows the result as a hex digest. Pick an algorithm, enter the key and the message, and copy the signature.

What an HMAC proves

HMAC stands for hash-based message authentication code. It is a keyed hash: combining a secret key with the message proves two things at once, that the message was created by someone who holds the key, and that it has not been altered in transit.

The difference from a plain hash is the key. Anyone can compute a SHA-256 of a message, but only someone with the shared secret can produce the correct HMAC, which is what turns a checksum into proof of authenticity.

Where HMAC shows up

That is why it is everywhere in web infrastructure. Webhooks from services like Stripe, GitHub and Slack sign each request with an HMAC so your server can verify the call really came from them, and many APIs sign requests the same way.

Choosing an algorithm

SHA-256 is the common default; SHA-384 and SHA-512 are stronger, while SHA-1 is legacy and best avoided for new systems.

Security note

It runs locally with the Web Crypto API, so your key and message are never uploaded, which is important since the key is a secret.

คำถามที่พบบ่อย

HMAC คืออะไร?

keyed hash ที่พิสูจน์ว่าข้อความถูกสร้างโดยผู้ที่ถือคีย์ความลับและไม่ถูกแก้ไข ใช้กันอย่างแพร่หลายสำหรับการลงชื่อ API request และ webhooks

Secret ของฉันถูกส่งไปที่ไหนไหม?

ไม่ HMAC ถูกคำนวณในเบราว์เซอร์ของคุณด้วย Web Crypto API ดังนั้นคีย์และข้อความจะไม่ออกจากอุปกรณ์

ควรใช้ algorithm ใด?

SHA-256 คือค่าเริ่มต้นทั่วไป SHA-384 และ SHA-512 แข็งแกร่งกว่า SHA-1 เป็น legacy และควรหลีกเลี่ยงสำหรับระบบใหม่

แหล่งข้อมูล

ฝังเครื่องมือนี้

เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ

<iframe src="https://monu.tools/embed/th/hmac-generator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

เครื่องมือที่เกี่ยวข้อง