build md5-utils

2000-10-27    <jpr@helixcode.com>

	* Makefile.am: build md5-utils

	* md5-utils.c: Make part of util, get rid of camel stream util
	function include string.h

	* md5-utils.h: ditto

2000-10-27    <jpr@helixcode.com>

	* providers/pop3/Makefile.am: Tidy up build

	* providers/smtp/Makefile.am: ditto

	* Makefile.am:  Move md5-utils.[hc] to e-util because the
	addressbook is going to use md5 hashes for pilot syncing.
	Maybe the calendar conduits as well because this is a good idea
	Chris had.

svn path=/trunk/; revision=6234
This commit is contained in:
7
2000-10-27 18:28:20 +00:00
committed by JP Rosevear
parent c0de1438d0
commit 4edb2c4651
8 changed files with 35 additions and 37 deletions

View File

@ -1,3 +1,14 @@
2000-10-27 <jpr@helixcode.com>
* providers/pop3/Makefile.am: Tidy up build
* providers/smtp/Makefile.am: ditto
* Makefile.am: Move md5-utils.[hc] to e-util because the
addressbook is going to use md5 hashes for pilot syncing.
Maybe the calendar conduits as well because this is a good idea
Chris had.
2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
* camel-exceptions-list.def: Add newline to kill warnings.

View File

@ -9,6 +9,7 @@ lib_LTLIBRARIES = libcamel.la
INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \
-I$(top_srcdir)/intl \
-I$(top_srcdir)/e-util \
$(GLIB_CFLAGS) \
$(UNICODE_CFLAGS) \
-DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
@ -60,7 +61,6 @@ libcamel_la_SOURCES = \
gmime-content-field.c \
gstring-util.c \
hash-table-utils.c \
md5-utils.c \
string-utils.c
libcamelinclude_HEADERS = \
@ -112,11 +112,12 @@ libcamelinclude_HEADERS = \
gmime-content-field.h \
gstring-util.h \
hash-table-utils.h \
md5-utils.h \
string-utils.h
libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS)
EXTRA_DIST = \
README

View File

@ -13,9 +13,10 @@ INCLUDES = \
-I$(srcdir)/../../.. \
-I$(includedir) \
-I$(top_srcdir)/intl \
$(GTK_INCLUDEDIR) \
-I$(top_srcdir)/camel \
-I$(top_srcdir)/e-util \
$(KRB4_CFLAGS) \
$(GTK_INCLUDEDIR) \
-DG_LOG_DOMAIN=\"camel-pop3-provider\"
libcamelpop3_la_SOURCES = \
@ -30,4 +31,6 @@ libcamelpop3include_HEADERS = \
libcamelpop3_la_LDFLAGS = $(KRB4_LDFLAGS) -version-info 0:0:0
libcamelpop3_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS)
EXTRA_DIST = libcamelpop3.urls

View File

@ -13,8 +13,9 @@ INCLUDES = \
-I$(srcdir)/../../.. \
-I$(includedir) \
-I$(top_srcdir)/intl \
$(GTK_INCLUDEDIR) \
-I$(top_srcdir)/camel \
-I$(top_srcdir)/e-util \
$(GTK_INCLUDEDIR) \
-DG_LOG_DOMAIN=\"camel-smtp-provider\"
libcamelsmtp_la_SOURCES = \
@ -27,4 +28,6 @@ libcamelsmtpinclude_HEADERS = \
libcamelsmtp_la_LDFLAGS = -version-info 0:0:0
libcamelsmtp_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS)
EXTRA_DIST = libcamelsmtp.urls

View File

@ -1,3 +1,12 @@
2000-10-27 <jpr@helixcode.com>
* Makefile.am: build md5-utils
* md5-utils.c: Make part of util, get rid of camel stream util
function include string.h
* md5-utils.h: ditto
2000-10-27 <jpr@helixcode.com>
* e-pilot-map.c (e_pilot_map_lookup_uid): Return null if no

View File

@ -30,7 +30,9 @@ libeutil_la_SOURCES = \
e-list.c \
e-list.h \
e-sexp.c \
e-sexp.h
e-sexp.h \
md5-utils.c \
md5-utils.h
libeutil_la_LIBADD = $(UNICODE_LIBS)

View File

@ -25,6 +25,7 @@
#include "md5-utils.h"
#include <stdio.h>
#include <string.h>
static void md5_transform (guint32 buf[4], const guint32 in[16]);
@ -318,36 +319,6 @@ md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16])
}
/**
* md5_get_digest_from_stream: get the md5 hash of a stream
* @stream: stream
* @digest: 16 bytes buffer receiving the hash code.
*
* Get the md5 hash of a stream. The result is put in
* the 16 bytes buffer @digest .
**/
void
md5_get_digest_from_stream (CamelStream *stream, guchar digest[16])
{
MD5Context ctx;
guchar tmp_buf[1024];
gint nb_bytes_read;
md5_init (&ctx);
nb_bytes_read = camel_stream_read (stream, tmp_buf, 1024);
while (nb_bytes_read) {
md5_update (&ctx, tmp_buf, nb_bytes_read);
nb_bytes_read = camel_stream_read (stream, tmp_buf, 1024);
}
md5_final (&ctx, digest);
}
/**
* md5_get_digest_from_file: get the md5 hash of a file
* @filename: file name

View File

@ -27,7 +27,6 @@
#define MD5_UTILS_H
#include <glib.h>
#include <camel/camel-stream.h>
typedef struct {
guint32 buf[4];
@ -39,7 +38,6 @@ typedef struct {
void md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16]);
void md5_get_digest_from_stream (CamelStream *stream, guchar digest[16]);
/* use this one when speed is needed */
/* for use in provider code only */