Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Password Storing
QtWS25 Last Chance

Password Storing

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 5 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Bhushan_SureB Offline
    Bhushan_SureB Offline
    Bhushan_Sure
    wrote on last edited by
    #1

    Is there anything in Qt where we can store password at application level like in android we use "key chain" and in ios we use "key store". Is there anything like this in Qt where it can be secure and not accessible by others. Thank you in Advance :)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      No there's not as password management is outside of Qt's scope even though applications doing that can be built using Qt. You'll also have to distinguish between your OS password manager and application providing password management.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Bhushan_SureB 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi and welcome to devnet,

        No there's not as password management is outside of Qt's scope even though applications doing that can be built using Qt. You'll also have to distinguish between your OS password manager and application providing password management.

        Bhushan_SureB Offline
        Bhushan_SureB Offline
        Bhushan_Sure
        wrote on last edited by
        #3

        @SGaist thank you for reply 😊, can i do like this like take the user input ans hash it and save into database , it will be secure and right way ?

        aha_1980A 1 Reply Last reply
        0
        • Bhushan_SureB Bhushan_Sure

          @SGaist thank you for reply 😊, can i do like this like take the user input ans hash it and save into database , it will be secure and right way ?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Bhushan_Sure said in Password Storing:

          it will be secure and right way ?

          Nothing is secure. Everyone with access to the database can extract the hash and try to reconstruct the password from it.

          You can only make it hard for them to do this:

          • Use restricted access rights to read the data from database
          • Use long passwords
          • Use good hashing algorithm with salt

          Disclaimer: I'm no security expert.

          Qt has to stay free or it will die.

          Bhushan_SureB 1 Reply Last reply
          3
          • aha_1980A aha_1980

            @Bhushan_Sure said in Password Storing:

            it will be secure and right way ?

            Nothing is secure. Everyone with access to the database can extract the hash and try to reconstruct the password from it.

            You can only make it hard for them to do this:

            • Use restricted access rights to read the data from database
            • Use long passwords
            • Use good hashing algorithm with salt

            Disclaimer: I'm no security expert.

            Bhushan_SureB Offline
            Bhushan_SureB Offline
            Bhushan_Sure
            wrote on last edited by
            #5

            @aha_1980 ok thank you very much 😊😊, i will try this.

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              You can also use OpenSSL to encrypt the user password before saving to database (then you must make sure you keep your master password safe - or not saved at all, anywhere). Because, as I understand, you want to store the passwords and be able to read them back - if yes then storing a hash of the password alone will give you nothing (hashing functions are one-directional: you can't un-hash something and get the original string).

              (Z(:^

              Bhushan_SureB 1 Reply Last reply
              2
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                If you want a nice example on how to manage user password in a database, take a look at the Django project. It's in python but their default to hash user password is pretty good.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                2
                • sierdzioS sierdzio

                  You can also use OpenSSL to encrypt the user password before saving to database (then you must make sure you keep your master password safe - or not saved at all, anywhere). Because, as I understand, you want to store the passwords and be able to read them back - if yes then storing a hash of the password alone will give you nothing (hashing functions are one-directional: you can't un-hash something and get the original string).

                  Bhushan_SureB Offline
                  Bhushan_SureB Offline
                  Bhushan_Sure
                  wrote on last edited by
                  #8

                  @sierdzio Thank You , I will try openssl also.

                  1 Reply Last reply
                  0
                  • dheerendraD Offline
                    dheerendraD Offline
                    dheerendra
                    Qt Champions 2022
                    wrote on last edited by dheerendra
                    #9

                    If you are trying store on android, I suggest you go the native way & use keystore in Android. That is the best to achieve.

                    Dheerendra
                    @Community Service
                    Certified Qt Specialist
                    http://www.pthinks.com

                    Bhushan_SureB 1 Reply Last reply
                    2
                    • dheerendraD dheerendra

                      If you are trying store on android, I suggest you go the native way & use keystore in Android. That is the best to achieve.

                      Bhushan_SureB Offline
                      Bhushan_SureB Offline
                      Bhushan_Sure
                      wrote on last edited by
                      #10

                      @dheerendra okay sir 😊😊

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved