~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/sha1.c

Moved base64.h to mysys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
     - More comments
49
49
*/
50
50
 
51
 
#include <mystrings/m_string.h>
 
51
#include "my_global.h"
 
52
#include "m_string.h"
52
53
#include "sha1.h"
53
54
 
54
55
/*
134
135
  {
135
136
    SHA1PadMessage(context);
136
137
     /* message may be sensitive, clear it out */
137
 
    memset(context->Message_Block, 0, 64);
 
138
    bzero((char*) context->Message_Block,64);
138
139
    context->Length   = 0;    /* and clear length  */
139
140
    context->Computed = 1;
140
141
  }
322
323
  if (i > 55)
323
324
  {
324
325
    context->Message_Block[i++] = 0x80;
325
 
    memset(&context->Message_Block[i], 0,
326
 
           sizeof(context->Message_Block[0])*(64-i));
 
326
    bzero((char*) &context->Message_Block[i],
 
327
          sizeof(context->Message_Block[0])*(64-i));
327
328
    context->Message_Block_Index=64;
328
329
 
329
330
    /* This function sets context->Message_Block_Index to zero  */
330
331
    SHA1ProcessMessageBlock(context);
331
332
 
332
 
    memset(&context->Message_Block[0], 0,
333
 
           sizeof(context->Message_Block[0])*56);
 
333
    bzero((char*) &context->Message_Block[0],
 
334
          sizeof(context->Message_Block[0])*56);
334
335
    context->Message_Block_Index=56;
335
336
  }
336
337
  else
337
338
  {
338
339
    context->Message_Block[i++] = 0x80;
339
 
    memset(&context->Message_Block[i], 0,
340
 
           sizeof(context->Message_Block[0])*(56-i));
 
340
    bzero((char*) &context->Message_Block[i],
 
341
          sizeof(context->Message_Block[0])*(56-i));
341
342
    context->Message_Block_Index=56;
342
343
  }
343
344