Branch: Tag:

2015-02-23

2015-02-23 16:05:08 by Martin Nilsson <nilsson@opera.com>

Fortuna.random_string(): No need to allocate more than the final string, as we only copy as many bytes from the last block as we need.

286:    }       /*! @decl void reseed(string(8bit) data) -  *! Generates new a new key based on the provided additional -  *! entropy. +  *! Updated the internal key with the provided additional entropy.    */    PIKEFUN void reseed(string(8bit) data)    {
311:    struct string_builder s;       if(len<0) Pike_error("Length has to be positive.\n"); -  init_string_builder_alloc(&s, len+16, 0); +  init_string_builder_alloc(&s, len, 0);       while( stored < len )    {