title: Convert int to scrambled Guid and back
body: <p>I'm looking for a way to convert an int to a Guid, but not have the next one be sequential to the next. For instance, I have this :</p>
  
  <pre><code>static void Main(string[] args)
  {
     var a = Int2Guid(1);
     var b = Int2Guid(2);
  }
  
  public static Guid Int2Guid(int value)
  {
      byte[] bytes = new byte[16];
      BitConverter.GetBytes(value).CopyTo(bytes, 0);
      return new Guid(bytes);
  }
  
  public static int Guid2Int(Guid value)
  {
      byte[] b = value.ToByteArray();
      int bint = BitConverter.ToInt32(b, 0);
      return bint;
  }
  </code></pre>
  
  <p>This works, but I don't want the numbers to be, nor appear, sequential. From the above example, I get <code>a = {00000001-0000-0000-0000-000000000000}</code>, but <code>b = {00000002-0000-0000-0000-000000000000}</code>. I would like something like <code>{48204b95-9cbb-4295-a6b1-cf05ebda9d0d}</code>.</p>
  
  <p>Any advice?</p>