Re: tmpfile alternative

From: Pavel Kankovsky (peakat_private)
Date: Thu Jan 10 2002 - 17:48:04 PST

  • Next message: Ryan M Harris: "Re: Safe session IDs"

    On Thu, 3 Jan 2002, Giorgio Zoppi wrote:
    
    >       while (count < 9)
    > 	{
    > 	  fread (&num, sizeof (unsigned int), 1, urand_file);
    > 	  stream[count] = (char) num;
    > 	  count++;
    > 	}
    >       base64_encode (&b, stream, 9);
    
    It is a good idea to preprocess raw random data before you use them
    as a filename but (pure) BASE64 is not a good choice because one of the
    characters it generates is a slash.
    
    --Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
    "Resistance is futile. Open your source code and prepare for assimilation."
    



    This archive was generated by hypermail 2b30 : Fri Jan 11 2002 - 13:06:59 PST