view 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
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;
		}
	}
}