-3

Find this string in HTTP POST request.

<UDID>92b690dd7d6c90e10eb3540edf2eedc8b075b8fd</UDID>

How can I generate random UDIDs in this format in C#?

  • 5
    Please at least [show some kind of attempt at figuring this out yourself](http://idownvotedbecau.se/noattempt/) to avoid downvotes. – Heretic Monkey Feb 12 '19 at 15:25
  • 3
    See https://www.theiphonewiki.com/wiki/UDID#2007-August_2018 how to calculate a UDID. Basically it's the SHA1 hash of the serial number + IMEI (or empty string if no IMEI) + WiFi MAC address + Bluetooth MAC address. – ckuri Feb 12 '19 at 15:29
  • Use the answers to [How can I generate random alphanumeric strings?](https://stackoverflow.com/q/1344221/215552) to generate a random string of your desired length and character range. – Heretic Monkey Feb 12 '19 at 15:35

1 Answers1

0

You could use the code

       var xpto = Guid.NewGuid().ToString("N");

It gives you a GUID without hyphens, what I think should do what you want.