List Archive


Thread Index


From: Andreas Falkenhahn <>
To: libzip mailing list <>
Subject: Porting zip_random() to non-Unix platform
Date: Thu, 9 Nov 2017 16:11:22 +0100

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)
        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                 

Made by MHonArc.