~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/sha1.c

Replacing all bzero() calls with memset() calls and removing the bzero.c file.
Also removing check for bzero from the 'configure.ac' autoconf file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
  {
136
136
    SHA1PadMessage(context);
137
137
     /* message may be sensitive, clear it out */
138
 
    bzero((char*) context->Message_Block,64);
 
138
    memset((char*) context->Message_Block, 0, 64);
139
139
    context->Length   = 0;    /* and clear length  */
140
140
    context->Computed = 1;
141
141
  }
323
323
  if (i > 55)
324
324
  {
325
325
    context->Message_Block[i++] = 0x80;
326
 
    bzero((char*) &context->Message_Block[i],
 
326
    memset((char*) &context->Message_Block[i], 0,
327
327
          sizeof(context->Message_Block[0])*(64-i));
328
328
    context->Message_Block_Index=64;
329
329
 
330
330
    /* This function sets context->Message_Block_Index to zero  */
331
331
    SHA1ProcessMessageBlock(context);
332
332
 
333
 
    bzero((char*) &context->Message_Block[0],
 
333
    memset((char*) &context->Message_Block[0], 0,
334
334
          sizeof(context->Message_Block[0])*56);
335
335
    context->Message_Block_Index=56;
336
336
  }
337
337
  else
338
338
  {
339
339
    context->Message_Block[i++] = 0x80;
340
 
    bzero((char*) &context->Message_Block[i],
 
340
    memset((char*) &context->Message_Block[i], 0,
341
341
          sizeof(context->Message_Block[0])*(56-i));
342
342
    context->Message_Block_Index=56;
343
343
  }