JWT जेनरेटर और वेरिफ़ायर
HMAC, RSA, ECDSA या RSA-PSS keys से JWTs बनाएँ और signatures को लोकल verify करें।
इस्तेमाल कैसे करें
Sign और algorithm चुनें, typ, optional kid और Claims JSON edit करें, फिर HMAC secret या PKCS#8 private PEM डालें। Helpers iat, nbf, exp और cryptographic UUID jti जोड़ते हैं; token live update होता है। Sample fresh in-memory key material और realistic claims बनाता है। Verify में token के साथ matching secret या SPKI public PEM पेस्ट करें और allowed clock skew सेट करें। Verification token header पर भरोसा करने के बजाय चुना algorithm enforce करता है, फिर signature status और exp, nbf, future iat failures दिखाता है। Base64 mode HMAC secrets को इस्तेमाल से पहले decode करता है। Keys और tokens कभी persist नहीं होते।
आम सवाल
HS256 JWT कैसे बनाएँ?
HS256 चुनें, Claims JSON और पर्याप्त random HMAC secret डालें, फिर live update होने वाला token कॉपी करें। Secret plain text के बजाय encoded हो तो Base64 option चालू करें।
JWT signing कौन-से PEM key formats इस्तेमाल करता है?
RSA, ECDSA और RSA-PSS signing PKCS#8 private key import करते हैं। Verification corresponding SPKI public key import करता है। Web Crypto import encrypted PEM files support नहीं करता।
क्या JWT verification alg header पर भरोसा करता है?
नहीं। Key import होने से पहले selected algorithm का header से match होना जरूरी है, जिससे HMAC और asymmetric verification paths के बीच switching रुकती है।
क्या JWT keys या tokens store या upload होते हैं?
नहीं। Secrets, PEM keys, claims और tokens केवल memory में रहते हैं और सभी cryptographic operations Web Crypto API से लोकल चलते हैं।