Mercurial > hg > ucis.core
view NaCl/randombytes.cs @ 60:3424fa5a12c9
Updated Windows USB enumeration classes and VBoxUSB backend
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sat, 12 Oct 2013 16:35:24 +0200 |
parents | c873e3dd73fe |
children |
line wrap: on
line source
???using System; using System.Security.Cryptography; namespace UCIS.NaCl { public static class randombytes { public static void generate(Byte[] x) { RNGCryptoServiceProvider rnd = new RNGCryptoServiceProvider(); rnd.GetBytes(x); } public static Byte[] generate(int count) { Byte[] bytes = new Byte[count]; generate(bytes); return bytes; } } }