title: C# : Generate Unique Local IPv6 Address Prefix
body: <p>I am trying to generate the unique Local IPv6 address prefix ( Given in link <a href="https://www.rfc-editor.org/rfc/rfc4193" rel="nofollow noreferrer">https://www.rfc-editor.org/rfc/rfc4193</a>) <strong>Section:3.2.2.  Sample Code for Pseudo-Random Global ID Algorithm</strong></p>
  <p>Steps are given below here as well...</p>
  <ol>
  <li><p>Obtain the current time of day in 64-bit NTP format [NTP].</p>
  <ol start="2">
  <li><p>Obtain an EUI-64 identifier from the system running this
  algorithm.  If an EUI-64 does not exist, one can be created from
  a 48-bit MAC address as specified in [ADDARCH].  If an EUI-64
  cannot be obtained or created, a suitably unique identifier,
  local to the node, should be used (e.g., system serial number).</p>
  </li>
  <li><p>Concatenate the time of day with the system-specific identifier
  in order to create a key.</p>
  </li>
  <li><p>Compute an SHA-1 digest on the key as specified in [FIPS, SHA1];
  the resulting value is 160 bits.</p>
  </li>
  <li><p>Use the least significant 40 bits as the Global ID.</p>
  </li>
  <li><p>Concatenate FC00::/7, the L bit set to 1, and the 40-bit Global
  ID to create a Local IPv6 address prefix.</p>
  </li>
  </ol>
  </li>
  </ol>
  <p>This algorithm will result in a Global ID that is reasonably unique
  and can be used to create a locally assigned Local IPv6 address
  prefix.</p>
  <p><strong>I just wanted to know is there any C# built-in method or any nuget package available that does it, or would be helpful if anyone can provide the c# code for it.</strong></p>
  <p>I guess in C#, it is called as IPv6SiteLocal.</p>