HMAC 생성기
브라우저에서 직접 HMAC-SHA256/384/512 서명을 생성하세요. Web Crypto API를 사용하여 비밀 키가 기기를 떠나지 않습니다. 100% 클라이언트 사이드.
100% 클라이언트 사이드 — 데이터가 기기를 떠나지 않습니다
Note: All HMAC and JWT generation happens entirely in your browser using the Web Crypto API. Your secret key never leaves your device.
For JWT generation, the payload must be valid JSON. The tool will automatically generate a JWT token with the standard header {"alg": "HS256", "typ": "JWT"}.
코드 예제
프로젝트에 바로 사용할 수 있는 코드 스니펫입니다.
Python
import hmac
import hashlib
import base64
secret = "my-secret-key".encode()
payload = '{"user":"alice","role":"admin"}'.encode()
# HMAC-SHA256 (hex output)
sig = hmac.new(secret, payload, hashlib.sha256).hexdigest()
print(sig) # e.g. a1b2c3d4...
# HMAC-SHA256 (Base64 output)
sig_b64 = base64.b64encode(
hmac.new(secret, payload, hashlib.sha256).digest()
).decode()
print(sig_b64)
# Verify a webhook signature
def verify_webhook(payload: bytes, sig: str, secret: bytes) -> bool:
expected = hmac.new(secret, payload, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, sig)
자주 묻는 질문
아래에서 검색하거나 가장 일반적인 질문을 둘러보세요.
HMAC(Hash-based Message Authentication Code)은 암호화 해시 함수와 비밀 암호화 키를 사용하는 특정 유형의 메시지 인증 코드입니다.
아니요. HMAC 생성은 Web Crypto API를 사용하여 브라우저에서 완전히 클라이언트 사이드로 처리됩니다.
Related Tools
Base64 Converter
Encode text to Base64 or decode Base64 to text — all in one tool
JWT Encoder
Generate and sign JSON Web Tokens (JWT) using the HS256 algorithm securely
Basic Auth Decoder
Decode HTTP Basic Authentication headers to reveal username and password
Base64 Encoder
Encode plain text to Base64 format with UTF-8, ASCII, and ISO-8859-1 support