Generate temporary random password from another qt project



  • Hello guys,

    I am working on Qt 4.7.4 project , on embedded device imx6 (card) , i want to generate a temporary password to unlock a login page :

    The purpose is that when customers uses the embedded device , if they forgot their password we want to be able to generate random password for them , for a 15 minutes duration,

    What i need to do , is to have one other external qt project which will generate a random password , and this password must be able to unlock the login page on the embedded device (only for 15 minutes duration).

    I don't know where to start , maybe having a generateTemporaryPassword() function shared between the two project ? but what about the duration ? and how to know the current password ?

    Or maybe there is already a mechanism to generate random password for a specific duration ?

    Or maybe the idea is to generate a pseudo-random password ?

    Can you guide me where to start ?



  • @mostefa interesting problem.

    The first thing that comes to my mind, would be utilizing Quuid qt 4 only has fromRfc4122(const QByteArray & bytes) to create one from a seed.

    you could create each minute a new Uuid based on the current time, hash-map it and each new minute, you check if the login pasword/uuid ist still part of the valid QUuid map.

    Technically, it wouldn't be that "random" but still pretty hard to guess, without disassembling.


  • Lifetime Qt Champion

    Hi,

    Are you thinking of something along the line of Time-based One Time Password ?



  • @SGaist

    Thank you for your relevant answer , this what i was looking for , i will try it tomorrow !

    @J-Hilk Thank you for your answer too!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.