RevealTheme logo

تولیدکننده HMAC

با استفاده از SHA-1، SHA-256، SHA-384 یا SHA-512 امضاهای HMAC تولید می‌کند.

نحوه استفاده از این ابزار

  1. 1

    Pick a hash algorithm from the dropdown: SHA-1, SHA-256, SHA-384, or SHA-512.

  2. 2

    Type or paste your shared secret key into the key field.

  3. 3

    Type or paste the message you want to authenticate into the message box.

  4. 4

    Click Generate to compute the HMAC; the lowercase hex digest appears below.

تولیدکننده HMAC چیست؟

HMAC (Hash-based Message Authentication Code) هم یکپارچگی و هم اصالت یک پیام را با استفاده از یک کلید مخفی مشترک تأیید می‌کند. این پایه‌ی امضاهای webhook، امضای درخواست‌های API (AWS Signature V4، webhookهای Stripe) و الگوریتم‌های HS256/HS384/HS512 در JWT است.

موارد استفاده رایج

  • Verify an incoming webhook by recomputing the HMAC of the raw request body with your endpoint's signing secret and comparing it to the provider's signature header.

  • Check a Stripe webhook locally: HMAC-SHA256 the timestamped payload with your whsec_ secret to confirm your verification logic before deploying.

  • Debug a mismatched signature by pasting the exact bytes your server and client each signed to see which side is wrong.

  • Generate a quick integrity tag for a config file or message so a teammate with the same key can confirm it was not altered in transit.

  • Teach or learn how HMAC differs from a bare hash by toggling algorithms and watching the digest length change.

  • Sanity-check a single HMAC step of a larger signing scheme (such as one round of the AWS SigV4 key-derivation chain) during development.

پرسش‌های متداول

آیا HMAC همان هش است؟
خیر. یک هش ساده (SHA-256) را هر کسی می‌تواند محاسبه کند. HMAC به یک کلید مخفی نیاز دارد: بدون آن، نه می‌توانید امضا را تأیید کنید و نه جعل.

ابزارهای مرتبط