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 7061607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:29:42+00:00 2026-05-28T04:29:42+00:00

I have a database of users that are identified by their device udid (which

  • 0

I have a database of users that are identified by their device udid (which got deprecated in iOS 5). I need a new way to identify devices that will not generate strings that already exist in my database.

The udid used to be SHA1(SerialNumber + IMEI + WiFiAddress + BluetoothAddress).

Is it safe to use the output of something like MD5(MACAddress) as my new way to identify devices? From what I’ve read it seems like MD5 and SHA-1 output different lengths of strings (respectively 128 and 160 bits), but I’m just making sure I’m not missing anything here. I really don’t want to end up with duplicate identifiers…

  • 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-28T04:29:42+00:00Added an answer on May 28, 2026 at 4:29 am

    Just use SHA1(MAC | 0001) instead of the previous one. The chance of creating a SHA1 that already exists is unlikely to the extreme, as it would indicate a real problem in the SHA1 algorithm (a collision). Note: I presume that + means concatenation, I’ve used | as concatenation.

    You can increase the counter (in characters or something else, try for 4 bytes) at the end if you need another unique identifier.

    Although MD5 is probably safe enough for this purpose, I would still try and avoid the use of this broken hash – just keep with SHA1 (or move to SHA-256).

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

Sidebar

Related Questions

If i have items stored in a database that users can download after they
I have a database called ADB. When I create a new user/role, that user
In my application users have their own websites which can be reached if they
I have a SQL Server 2005 database that stores data for multiple users. Each
I've just started a job and have identified an issue in which the database
I have a database that uses codes. Each code can be anywhere from two
I have a user that enters a piece of data into my database and
Let's say I have a user that entered 12 links into the database but
I have a database that is being filled by user defined EditTexts. None of
We have an application that uses Hibernate's 2nd level caching to avoid database hits.

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.