prng.c 187 B

123456789101112131415
  1. #include "os.h"
  2. #include <mp.h>
  3. #include <libsec.h>
  4. //
  5. // just use the libc prng to fill a buffer
  6. //
  7. void
  8. prng(uchar *p, int n)
  9. {
  10. uchar *e;
  11. for(e = p+n; p < e; p++)
  12. *p = rand();
  13. }