हैश/क्रिप्टो
TOTP Generator/Verifier
समय-आधारित वन-टाइम पासवर्ड (TOTP, RFC 6238) — किसी सीक्रेट से मौजूदा कोड जनरेट करें और क्लॉक-ड्रिफ्ट टॉलरेंस के साथ दर्ज किए गए कोड को वेरिफाई करें।
------
TOTP (Time-based One-Time Password, RFC 6238) is a two-factor authentication algorithm that generates a one-time code from a secret and the current time. It's exactly what runs under the hood in Google Authenticator, Authy, and similar apps.
How to use it
- Generate: paste a secret key (usually Base32, the same one encoded in a 2FA setup QR code) and the tool shows the current 6-digit code along with the time left before it changes.
- Verify: enter a secret and a code from an authenticator app to check whether they match.
- Verification tolerates a small amount of clock drift — it accepts a code from a neighboring time step, not just the current one.
Common uses
- Debugging your own 2FA implementation on the backend — checking that the server generates and accepts codes correctly.
- Manually generating a code for an account when you don't have your phone with the authenticator app handy.
- Figuring out why an app's code is being rejected by the server (usually the cause is a clock out of sync).
Things to keep in mind
A TOTP code is only valid for a short window (usually 30 seconds) — that time limit is the main protection, not the secret alone.
Code accuracy depends directly on the device's clock being synced; a noticeable clock drift is the most common cause of rejected 2FA codes.
इस टूल के बारे में लेख: TOTP: ऑथेंटिकेटर ऐप्स में वन-टाइम कोड कैसे काम करते हैं
अक्सर पूछे जाने वाले प्रश्न
मेरा जनरेट किया गया कोड इतनी जल्दी एक्सपायर क्यों होता है?
TOTP कोड समय-आधारित होते हैं — डिफ़ॉल्ट रूप से वे हर 30 सेकंड में बदलते हैं, वर्तमान Unix समय और साझा सीक्रेट से गणना किए जाते हैं। यह छोटी विंडो सीमित करती है कि लीक हुआ कोड कितनी देर तक उपयोगी रहता है।
अगर मेरे डिवाइस की घड़ी सिंक में नहीं है तो क्या होगा?
TOTP इस पर निर्भर करता है कि दोनों पक्ष वर्तमान समय पर लगभग सहमत हों। ज़्यादातर ऑथेंटिकेटर ऐप्स और सर्वर थोड़ा क्लॉक ड्रिफ्ट (आमतौर पर एक टाइम स्टेप) सहन करते हैं, लेकिन बड़ा अंतर मान्य कोड को अस्वीकार करवा देगा।
क्या यहां कोड जनरेट करते समय मेरी सीक्रेट की कहीं भेजी जाती है?
नहीं। TOTP कोड पूरी तरह आपके ब्राउज़र में गणना होता है — सीक्रेट की आपके डिवाइस से कभी बाहर नहीं जाती।
क्या TOTP फ़िशिंग से बचाव करता है?
पूरी तरह नहीं। अगर पीड़ित नकली साइट पर पासवर्ड और मौजूदा TOTP कोड डालता है, तो हमलावर तुरंत दोनों वैल्यूज़ को असली साइट पर इस्तेमाल कर सकता है, जब तक कोड वैध है। ऐसे रियल-टाइम अटैक से सिर्फ़ FIDO2/WebAuthn स्टैंडर्ड वाली हार्डवेयर कीज़ बचाती हैं।
सर्वर सिर्फ़ मौजूदा टाइम इंटरवल की बजाय पिछला इंटरवल भी क्यों स्वीकार करता है?
यह फ़ोन पर कोड जनरेट होने और सर्वर द्वारा उसे प्राप्त करने व वेरिफ़ाई करने के बीच के छोटे नेटवर्क डिले की भरपाई करता है। इस तरह की छूट के बिना, कुछ सेकंड की सामान्य देरी की वजह से वैध कोड भी कभी-कभी अस्वीकार हो जाते।