|
@@ -321,6 +321,15 @@ void MDString (char *string,unsigned char digest[16])
|
|
|
MD5Update (&context, (unsigned char *)string, len);
|
|
|
MD5Final (digest, &context);
|
|
|
}
|
|
|
+
|
|
|
+void MD5UpdaterString(MD5_CTX *context,const char *string)
|
|
|
+{
|
|
|
+ unsigned int len = strlen (string);
|
|
|
+ MD5Update (context, (unsigned char *)string, len);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+#if MD5_FILE_ENABLE
|
|
|
/* Digests a file and prints the result.
|
|
|
*/
|
|
|
int MD5File (char *filename,unsigned char digest[16])
|
|
@@ -342,11 +351,7 @@ int MD5File (char *filename,unsigned char digest[16])
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
-void MD5UpdaterString(MD5_CTX *context,const char *string)
|
|
|
-{
|
|
|
- unsigned int len = strlen (string);
|
|
|
- MD5Update (context, (unsigned char *)string, len);
|
|
|
-}
|
|
|
+
|
|
|
int MD5FileUpdateFile (MD5_CTX *context,char *filename)
|
|
|
{
|
|
|
FILE *file;
|
|
@@ -362,3 +367,6 @@ int MD5FileUpdateFile (MD5_CTX *context,char *filename)
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
+#endif
|
|
|
+
|
|
|
+
|