Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to generate Uuid based on system MAC address

How to generate Uuid based on system MAC address

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 1.5k Views 1 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.
  • R Offline
    R Offline
    rakeshthp
    wrote on last edited by
    #1

    Hi,

    I want to generate Uuid based on the system's MAC address using Qt. I could not find suitable example to do so. I am able to produce the mac address. Can someone guide me in order to implement this?

    Thanks & Regards

    raven-worxR 1 Reply Last reply
    0
    • R rakeshthp

      Hi,

      I want to generate Uuid based on the system's MAC address using Qt. I could not find suitable example to do so. I am able to produce the mac address. Can someone guide me in order to implement this?

      Thanks & Regards

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @rakeshthp
      i don't quite understand what you want.
      the MAC and UUID should both be unique per se.

      You want a "mapping" from MAC to UUID?!

      What you are looking for is some sort of hashing no? If so you can look at QCryptographicHash

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • R Offline
        R Offline
        red_spider
        wrote on last edited by
        #3

        @rakeshthp said in How to generate Uuid based on system MAC address:

        I want to generate Uuid based on the system's MAC address using Qt. I could not find suitable example to do so. I am able to produce the mac address. Can someone guide me in order to implement this?

        find MAC

            QStringList m_list_mac;
            foreach(QNetworkInterface interface, QNetworkInterface::allInterfaces())
            {
                // Return only the first non-loopback MAC Address
                if (!(interface.flags() & QNetworkInterface::IsLoopBack )&& (interface.flags() & QNetworkInterface::IsUp))
                {
                    m_list_mac.append(interface.hardwareAddress());
        
                }
            }
        

        and used for crypt QCryptographicHash
        as recommended raven-worx

        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