Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1051107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:52:41+00:00 2026-05-16T16:52:41+00:00

Possible Duplicate: Reliable way of generating unique hardware ID Am trying to generate an

  • 0

Possible Duplicate:
Reliable way of generating unique hardware ID

Am trying to generate an ID that will be unique to a particular computer. The ID will not be generated randomly. It will be calculation based, such that the ID generated for computer A will be fixed and unique to computer A. Everytime the program is executed on computer A, it will continue to generate the same ID and when executed on another computer, it will generate another ID unique to that computer. This is to ensure that two computers don’t have the same ID.

My Challenge: For my program to be able to generate an ID unique to a computer, it needs to perform the calculation based on a seed unique to the computer executing it.

My Question: How can i get a value unique to a computer, so that i can use the value as a seed in the ID generation program?

Is it possible to get a value from a computer’s hardware(eg motherboard) that is unique to that computer? That way, the value is most likely not to change as long as the computer’s motherboard is not replaced.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:52:42+00:00Added an answer on May 16, 2026 at 4:52 pm

    MAC address? Thats (for practical purposes) unique to every NIC so it guarantee’s reproducibility even if the user is dual booting. Sure there are rare cases of people trading cards, but coupled with other metrics (don’t only use this, since network cards can be changed), it’s still possible.

    How would you get it?

    public static byte[] getMACAddress() throws SocketException, UnknownHostException {
        InetAddress address = InetAddress.getLocalHost();
        NetworkInterface networkInterface = NetworkInterface.getByInetAddress(address);
    
        return networkInterface.getHardwareAddress();
    }
    

    If you want a String representation, do this

    for (int byteIndex = 0; byteIndex < macAddress.length; byteIndex++) {
        System.out.format("%02X%s", macAddress[byteIndex], (byteIndex < macAddress.length - 1) ? "-" : "");
    }
    

    (thanks to http://www.kodejava.org/examples/250.html)

    Note: As mentioned in the comments, Mac addresses can be spoofed. But your talking about a small part of the population doing this, and unless your using this for anti-piracy stuff, its unique enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Reliable way of generating unique hardware ID I would like to retrieve
Possible Duplicate: Reading through file using ifstream I'm trying to find a way to
Possible Duplicate: What's the most reliable way to prohibit a copy constructor in C++?
Possible Duplicate: nth-child for every two table rows I'm trying to work my way
Possible Duplicate: Sending large files reliably in PHP I will be distributing a PHP
Possible Duplicate: Objective C for Windows iPhone development on Windows Is there any way
Possible Duplicate: Learning to write a compiler I looked around trying to find out
Possible Duplicate: Reliable method to get machine's MAC address in C# I want to
Possible Duplicate: Why is the `gets' function is dangerous? Why should not be used?
Possible Duplicate: Difference of create Index by using include column or not using Edit:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.