List Archive
Thread
-
Porting zip_random() to non-Unix platform,
Andreas Falkenhahn
(2017/11/09 15:11:18)
- Re: Porting zip_random() to non-Unix platform, Thomas Klausner (2017/11/13 10:42:10)
Message
I don't know anything about cryptography so I'm not sure if this is a good idea: bool zip_random(zip_uint8_t *buffer, zip_uint16_t length) { srand(time(NULL)); while(length--) *buffer++ = rand() % 256; return true; } If this is not a good idea, does anybody have an idea on a good way of porting zip_random() to a platform that only has the ANSI C runtime plus a few POSIX functions? -- Best regards, Andreas Falkenhahn mailto:andreas%falkenhahn.com@localhost
Made by MHonArc.