--- title: "One-time password generation" slug: "dp-sdk-ig-overview-otp-generation-4-39-0" updated: 2026-09-28T09:00:09Z published: 2026-09-28T09:00:09Z canonical: "docs.onespan.com/dp-sdk-ig-overview-otp-generation-4-39-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # One-time password generation ## Response-Only OTPs ![OTP generation in Response-Only mode (overview)](https://cdn.document360.io/038f59a7-abd0-4c14-9de7-3434d28b49fd/Images/Documentation/dp_sdk_otp_ro.png?sv=2026-02-06&spr=https&st=2026-11-16T15%3A55%3A33Z&se=2026-11-16T16%3A55%3A33Z&sr=b&sp=r&sig=%2BZbvu%2Bp2W4e4n4PjQ94o4T0n2NH07dIOr%2BFUNdMJNdc%3D) OTP generation in Response-Only mode (overview) The workflow involves the following steps: 1. The application integrating the SDK retrieves the Digipass static and dynamic vectors from its data storage. 2. The application calls the SDK's OTP generation function with the Digipass vectors. 3. The SDK returns an OTP and, optionally, a return host code (RHC) or an error code. The dynamic vector is updated. 4. The application updates the dynamic vector in its data storage. To update the dynamic vector, the application can rely on the [Secure Storage SDK](/mobile/docs/secure-storage-sdk). 5. The application processes the OTP, the RHC, or the error code. Routines of the password generation service in Response-Only mode: - C/C++/Objective C: DPSDK_GenerateResponseOnly - Swift: generateResponseOnly - Java: generateResponseOnly ## Challenge/Response OTPs ![OTP generation in Challenge/Response mode (overview)](https://cdn.document360.io/038f59a7-abd0-4c14-9de7-3434d28b49fd/Images/Documentation/dp_sdk_otp_cr.png?sv=2026-02-06&spr=https&st=2026-11-16T15%3A55%3A33Z&se=2026-11-16T16%3A55%3A33Z&sr=b&sp=r&sig=RI2fj0cJ8E02mQkq6Ijj00ws94irraxSflHVolbCORk%3D) OTP generation in Challenge/Response mode (overview) The workflow involves the following steps: 1. The user receives a challenge from the server. 2. The user enters it in the application integrating the SDK. 3. The application integrating the SDK retrieves the Digipass static and dynamic vectors from its data storage. 4. The application calls the SDK's OTP generation function with the Digipass vectors and the server challenge. 5. The SDK returns an OTP or an error code. The dynamic vectotr is updated. 6. The application updates the dynamic vector in its data storage. To update the dynamic vector, the application can rely on the [Secure Storage SDK](/mobile/docs/secure-storage-sdk). 7. The application processes the OTP or the error code. Routines of the password generation service in Challenge/Response mode: - C/C++/Objective C: DPSDK_GenerateResponseFromChallenge - Swift: generateResponseFromChallenge - Java: generateResponseFromChallenge