[BACK]Return to md5c.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / digest / files

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /pkgsrc/pkgtools/digest/files/md5c.c between version 1.4 and 1.5

version 1.4, 2007/07/03 18:54:04 version 1.5, 2007/09/21 18:44:36
Line 91  __weak_alias(MD5Final,_MD5Final)
Line 91  __weak_alias(MD5Final,_MD5Final)
 #define _DIAGASSERT(cond)       assert(cond)  #define _DIAGASSERT(cond)       assert(cond)
 #endif  #endif
   
 static void MD5Transform __P((UINT4 [4], const unsigned char [64]));  static void MD5Transform(UINT4 [4], const unsigned char [64]);
   
 static void Encode __P((unsigned char *, UINT4 *, unsigned int));  static void Encode(unsigned char *, UINT4 *, unsigned int);
 static void Decode __P((UINT4 *, const unsigned char *, unsigned int));  static void Decode(UINT4 *, const unsigned char *, unsigned int);
   
 /*  /*
  * Encodes input (UINT4) into output (unsigned char).  Assumes len is   * Encodes input (UINT4) into output (unsigned char).  Assumes len is
Line 184  static const unsigned char PADDING[64] =
Line 184  static const unsigned char PADDING[64] =
  * MD5 initialization. Begins an MD5 operation, writing a new context.   * MD5 initialization. Begins an MD5 operation, writing a new context.
  */   */
 void  void
 MD5Init(context)  MD5Init(MD5_CTX *context)
         MD5_CTX *context;               /* context */  
 {  {
   
         _DIAGASSERT(context != 0);          _DIAGASSERT(context != 0);
Line 205  MD5Init(context)
Line 204  MD5Init(context)
  * context.   * context.
  */   */
 void  void
 MD5Update(context, input, inputLen)  MD5Update(MD5_CTX *context, const uint8_t *input, size_t inputLen)
         MD5_CTX *context;               /* context */  
         const unsigned char *input;     /* input block */  
         unsigned int inputLen;          /* length of input block */  
 {  {
         unsigned int i, idx, partLen;          unsigned int i, idx, partLen;
   
Line 251  MD5Update(context, input, inputLen)
Line 247  MD5Update(context, input, inputLen)
  * message digest and zeroing the context.   * message digest and zeroing the context.
  */   */
 void  void
 MD5Final(digest, context)  MD5Final(unsigned char digest[16], MD5_CTX *context)
         unsigned char digest[16];       /* message digest */  
         MD5_CTX *context;               /* context */  
 {  {
         unsigned char bits[8];          unsigned char bits[8];
         unsigned int idx, padLen;          unsigned int idx;
           size_t padLen;
   
         _DIAGASSERT(digest != 0);          _DIAGASSERT(digest != 0);
         _DIAGASSERT(context != 0);          _DIAGASSERT(context != 0);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

CVSweb <webmaster@jp.NetBSD.org>