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
Forum Updated to NodeBB v4.3 + New Features

Password Storing

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 5 Posters 2.5k Views 2 Watching
  • 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.
  • B Offline
    B Offline
    Bhushan_Sure
    wrote on 22 Oct 2018, 10:55 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Oct 2018, 11:22 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

      B 1 Reply Last reply 22 Oct 2018, 14:12
      1
      • S SGaist
        22 Oct 2018, 11:22

        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.

        B Offline
        B Offline
        Bhushan_Sure
        wrote on 22 Oct 2018, 14:12 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 ?

        A 1 Reply Last reply 22 Oct 2018, 14:35
        0
        • B Bhushan_Sure
          22 Oct 2018, 14:12

          @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 ?

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 22 Oct 2018, 14:35 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.

          B 1 Reply Last reply 22 Oct 2018, 14:38
          3
          • A aha_1980
            22 Oct 2018, 14:35

            @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.

            B Offline
            B Offline
            Bhushan_Sure
            wrote on 22 Oct 2018, 14:38 last edited by
            #5

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

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 22 Oct 2018, 18:07 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(:^

              B 1 Reply Last reply 22 Oct 2018, 19:40
              2
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 22 Oct 2018, 19:17 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
                • S sierdzio
                  22 Oct 2018, 18:07

                  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).

                  B Offline
                  B Offline
                  Bhushan_Sure
                  wrote on 22 Oct 2018, 19:40 last edited by
                  #8

                  @sierdzio Thank You , I will try openssl also.

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dheerendra
                    Qt Champions 2022
                    wrote on 23 Oct 2018, 02:47 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

                    B 1 Reply Last reply 23 Oct 2018, 07:40
                    2
                    • D dheerendra
                      23 Oct 2018, 02:47

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

                      B Offline
                      B Offline
                      Bhushan_Sure
                      wrote on 23 Oct 2018, 07:40 last edited by
                      #10

                      @dheerendra okay sir 😊😊

                      1 Reply Last reply
                      0

                      5/10

                      22 Oct 2018, 14:38

                      • Login

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