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: - // $Id: setup_nsr.pike,v 1.4 2008/08/15 12:33:54 mast Exp $ + // $Id: setup_nsr.pike,v 1.5 2009/01/08 23:14:46 mast Exp $   //   // Setup .nsr (Networker) files for logfile directories if appropriate.   // NOTE: We must be paranoid; we must not alter files that the user
22:    }       int this_rev = -1; -  if (sscanf("$Revision: 1.4 $", "$""Revision: 1.%d $", this_rev) != 1) { +  if (sscanf("$Revision: 1.5 $", "$""Revision: 1.%d $", this_rev) != 1) {    vwerror("Failed to parse own revision $Rev$\n");    return;    }
44:    vwerror("No checksum.\n");    return;    } -  if (String.string2hex(Crypto.MD5()->update(old_content)->digest()) != -  csum) { +  if (String.string2hex(Crypto.MD5.hash(old_content)) != csum) {    vwerror("Bad checksum.\n");    return;    }
79:    Stdio.write_file(nsr_file,    sprintf("# Roxen nsr-checksum: %s\n"    "%s", -  String.string2hex(Crypto.MD5()->update(new_content) -  ->digest()), +  String.string2hex(Crypto.MD5.hash(new_content)),    new_content));    write("Updated nsr file %O\n", nsr_file);   }
106:    verbose++;    break;    case "version": -  write("$Id: setup_nsr.pike,v 1.4 2008/08/15 12:33:54 mast Exp $\n"); +  write("$Id: setup_nsr.pike,v 1.5 2009/01/08 23:14:46 mast Exp $\n");    break;    }    }   }