git: 9front

ref: c5114a9407bc5233f30b51e2442af95594fb32fb
dir: /sys/src/cmd/unix/drawterm/libsec/prng.c/

View raw version
#include "os.h"
#include <mp.h>
#include <libsec.h>

//
//  just use the libc prng to fill a buffer
//
void
prng(uchar *p, int n)
{
	uchar *e;

	for(e = p+n; p < e; p++)
		*p = rand();
}