Guest User

Untitled

a guest
Sep 18th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. public static Guid CreateCryptographicallySecureGuid()
  2. {
  3. using (var provider = new RNGCryptoServiceProvider())
  4. {
  5. var bytes = new byte[16];
  6. provider.GetBytes(bytes);
  7.  
  8. return new Guid(bytes);
  9. }
  10. }
Add Comment
Please, Sign In to add comment