]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libsec/port/prng.c
libsec: generalize pbkdf2_hmac_sha1() to pbkdf2_x() passing the hmac as an argument
[plan9front.git] / sys / src / libsec / port / prng.c
1 #include "os.h"
2 #include <mp.h>
3 #include <libsec.h>
4
5 //
6 //  just use the libc prng to fill a buffer
7 //
8 void
9 prng(uchar *p, int n)
10 {
11         uchar *e;
12
13         for(e = p+n; p < e; p++)
14                 *p = rand();
15 }