annotate NaCl/randombytes.cs @ 81:3352f89cf6f5
FBGUI ContainerControl fixes (client area, keyboard capture)
author |
Ivo Smits <Ivo@UCIS.nl> |
date |
Sun, 23 Feb 2014 16:56:42 +0100 |
parents |
c873e3dd73fe |
children |
|
rev |
line source |
20
|
1 ???using System; |
|
2 using System.Security.Cryptography; |
|
3 |
|
4 namespace UCIS.NaCl { |
|
5 public static class randombytes { |
|
6 public static void generate(Byte[] x) { |
|
7 RNGCryptoServiceProvider rnd = new RNGCryptoServiceProvider(); |
|
8 rnd.GetBytes(x); |
|
9 } |
|
10 public static Byte[] generate(int count) { |
|
11 Byte[] bytes = new Byte[count]; |
|
12 generate(bytes); |
|
13 return bytes; |
|
14 } |
|
15 } |
|
16 } |