Branch: Tag:

2009-01-08

2009-01-08 23:14:46 by Stephen R. van den Berg <srb@cuci.nl>

Patch from srb: Use compacter (and faster) Crypto.XYZ.hash() member function.

Rev: server/base_server/global_variables.pike:1.115
Rev: server/base_server/prototypes.pike:1.224
Rev: server/base_server/roxen.pike:1.1009
Rev: server/bin/setup_nsr.pike:1.5
Rev: server/etc/modules/RXML.pmod/module.pmod:1.389
Rev: server/modules/tags/rxmltags.pike:1.582
Rev: server/protocols/http.pike:1.574

1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS. - // $Id: global_variables.pike,v 1.114 2008/09/29 15:57:33 mast Exp $ + // $Id: global_variables.pike,v 1.115 2009/01/08 23:14:46 mast Exp $      // #pragma strict_types   #define DEFVAR mixed...:object
765:    roxenp()->set_locale();    } );    -  string secret=Crypto.MD5()->update(""+time(1)+random(100000))->digest(); +  string secret=Crypto.MD5.hash(""+time(1)+random(100000));    secret = MIME.encode_base64(secret,1);    defvar("server_salt", secret[..sizeof(secret)-3], LOCALE(8, "Server secret"),    TYPE_STRING|VAR_MORE|VAR_NO_DEFAULT,
776:    "you are satisfied with what your computers random "    "generator has produced.") );    -  secret = Crypto.MD5()->update(""+time(1)+random(100000)+"x"+gethrtime()) -  ->digest(); +  secret = Crypto.MD5.hash(""+time(1)+random(100000)+"x"+gethrtime());       definvisvar("argcache_secret","",TYPE_STRING|VAR_NO_DEFAULT);    set( "argcache_secret", secret );