aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-09-07 07:27:12 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-09-07 07:27:12 +0800
commit9043c1aa7a31915129d14f913c9126557ca49402 (patch)
tree303048164217d1da978037b3a44582e55851028f /camel
parentfe269dcef34863055a9641c300c20b9760f70ab2 (diff)
downloadgsoc2013-evolution-9043c1aa7a31915129d14f913c9126557ca49402.tar.gz
gsoc2013-evolution-9043c1aa7a31915129d14f913c9126557ca49402.tar.zst
gsoc2013-evolution-9043c1aa7a31915129d14f913c9126557ca49402.zip
camel/md5-utils.c Documented all funcs.
1999-09-07 bertrand <Bertrand.Guiheneuf@aful.org> * camel/md5-utils.c Documented all funcs. (md5_get_digest_from_stream): correct typo. (md5_get_digest_from_file): same typo corrected. svn path=/trunk/; revision=1189
Diffstat (limited to 'camel')
-rw-r--r--camel/md5-utils.c59
-rw-r--r--camel/md5-utils.h2
-rw-r--r--camel/providers/MH/mh-uid.c2
3 files changed, 53 insertions, 10 deletions
diff --git a/camel/md5-utils.c b/camel/md5-utils.c
index 30a750b12b..4696905176 100644
--- a/camel/md5-utils.c
+++ b/camel/md5-utils.c
@@ -49,10 +49,13 @@ _byte_reverse (guchar *buf, guint32 longs)
} while (--longs);
}
-/*
- * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
- * initialization constants.
- */
+/**
+ * md5_init: Initialise an md5 context object
+ * @ctx: md5 context
+ *
+ * Initialise an md5 buffer.
+ *
+ **/
void
md5_init (MD5Context *ctx)
{
@@ -71,10 +74,16 @@ md5_init (MD5Context *ctx)
}
-/*
+
+/**
+ * md5_update: add a buffer to md5 hash computation
+ * @ctx: conetxt object used for md5 computaion
+ * @buf: buffer to add
+ * @len: buffer length
+ *
* Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
+ * of bytes. Use this to progressively construct an md5 hash.
+ **/
void
md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
{
@@ -130,6 +139,13 @@ md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
+/**
+ * md5_final: copy the final md5 hash to a bufer
+ * @digest: 16 bytes buffer
+ * @ctx: context containing the calculated md5
+ *
+ * copy the final md5 hash to a bufer
+ **/
void
md5_final (guchar digest[16], MD5Context *ctx)
{
@@ -282,6 +298,15 @@ md5_transform (guint32 buf[4], const guint32 in[16])
+/**
+ * md5_get_digest: get the md5 hash of a buffer
+ * @buffer: byte buffer
+ * @buffer_size: buffer size (in bytes)
+ * @digest: 16 bytes buffer receiving the hash code.
+ *
+ * Get the md5 hash of a buffer. The result is put in
+ * the 16 bytes buffer @digest .
+ **/
void
md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16])
{
@@ -294,8 +319,16 @@ 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, gint buffer_size, guchar digest[16])
+md5_get_digest_from_stream (CamelStream *stream, guchar digest[16])
{
MD5Context ctx;
guchar tmp_buf[1024];
@@ -316,8 +349,16 @@ md5_get_digest_from_stream (CamelStream *stream, gint buffer_size, guchar digest
+/**
+ * md5_get_digest_from_file: get the md5 hash of a file
+ * @filename: file name
+ * @digest: 16 bytes buffer receiving the hash code.
+ *
+ * Get the md5 hash of a file. The result is put in
+ * the 16 bytes buffer @digest .
+ **/
void
-md5_get_digest_from_file (gchar *filename, gint buffer_size, guchar digest[16])
+md5_get_digest_from_file (gchar *filename, guchar digest[16])
{
MD5Context ctx;
guchar tmp_buf[1024];
diff --git a/camel/md5-utils.h b/camel/md5-utils.h
index 55dc5229d9..da5accbd5b 100644
--- a/camel/md5-utils.h
+++ b/camel/md5-utils.h
@@ -39,7 +39,7 @@ typedef struct {
void md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16]);
-void md5_get_digest_from_stream (CamelStream *stream, 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 */
diff --git a/camel/providers/MH/mh-uid.c b/camel/providers/MH/mh-uid.c
index d830a8f349..8c777accaa 100644
--- a/camel/providers/MH/mh-uid.c
+++ b/camel/providers/MH/mh-uid.c
@@ -66,3 +66,5 @@ mh_uid_get_for_file (gchar *filename)
return md5_digest_uid;
}
+
+
td>- Fix missing library problems when the linker enforces explicit linkingtijl2014-08-265-13/+32 * net-im/rubygem-tinder: 1.10.0swills2014-08-262-5/+5 * Reset maintainership on nonstaged portsbapt2014-08-251-1/+1 * Canonicalize a few LICENSE_PERMSantoine2014-08-221-1/+1 * Remove deletion of LC_MESSAGES directories that are owned by devel/gettextgrembo2014-08-201-4/+0 * Convert USE_GNOME=gnomehack to USES=pathfix, drop ltverhackamdmi32014-08-201-2/+2 * net-im/mikutter: avoid dependency on soon to be deprecated ruby-memoizeswills2014-08-191-1/+2 * - Drop .la files, no dependees require themamdmi32014-08-192-4/+2 * - Switch to USES=libtool, drop .la filesamdmi32014-08-192-4/+4 * - Convert USE_PYTHON_BUILD=yes to USES=python:build as suggested by check-sanityamdmi32014-08-191-2/+1 * STAGE.mandree2014-08-194-31/+25 * - Switch www/libwww to USES=libtool, drop .la filesamdmi32014-08-191-1/+1 * - Update to 3.0.5tota2014-08-172-3/+3 * - Update to 3.0.4 [1]tota2014-08-172-8/+9 * Add USES=readline to fix build on -current.adamw2014-08-171-1/+1 * Fix build on -current and fix shebangs.adamw2014-08-161-1/+8 * Fix build on -current, and fix some shebangs.adamw2014-08-161-1/+8 * Upgrade OpenEXR and ilmbase to 2.2.0.mandree2014-08-1614-14/+14 * Refresh.thierry2014-08-152-4/+4 * Refresh.thierry2014-08-156-5/+55 * Refresh.thierry2014-08-152-4/+4 * net-im/psi:makc2014-08-151-2/+2 * net-im/psi:makc2014-08-151-33/+22 * - Adjust options:sunpoet2014-08-142-47/+22 * net-im/chattahoochie: update to 1.9wg2014-08-104-17/+4 * Finish stage supportantoine2014-08-101-0/+1 * - Fix issue when building with HTTP option[1]ashish2014-08-103-1/+57 * Bump PORTREVISION on net-im/empathy after security/libtasn1 update intijl2014-08-061-1/+1 * Bump PORTREVISION on more ports that depend on libgcrypt after the updatetijl2014-08-061-1/+1 * Unbreak Prosody after lua default version change.lx2014-08-061-3/+6 * net-im/p5-Protocol-XMPP: 0.005 -> 0.006pi2014-08-053-4/+38 * net-im/p5-Net-Async-XMPP: 0.002 -> 0.003pi2014-08-053-4/+5 * net-im/py-xmpppy-yahoo: support stagewg2014-08-051-22/+10 * net-im/py-xmpppy-irc: support stagewg2014-08-051-13/+12 * - Fix crashing on 10.x and later, when ICONV option is enabledashish2014-08-041-1/+2 * Adapt the fixpacklist Perl hack to work with libpurple.marcus2014-08-021-0/+6 * - Use USES=twistedsunpoet2014-08-021-4/+1 * - Update to 14.07ashish2014-07-315-72/+57 * - Update to 0.8.1sunpoet2014-07-314-14/+19 * - Switch to USES=libtool, drop .la filesamdmi32014-07-313-17/+23 * - Switch to USES=libtool, drop .la filesamdmi32014-07-302-5/+5 * - Fix plistamdmi32014-07-301-1/+0 * - update to 1.8.2dinoex2014-07-301-2/+1 * security/libgcrypt: 1.5.3_3 -> 1.6.1pi2014-07-302-2/+2 * - Fix plistamdmi32014-07-301-7/+7 * Convert some more USE_BZIP2 to USES=tar:bzip2adamw2014-07-303-3/+3 * Convert a bunch of USE_XZ to USES=tar:xz.adamw2014-07-301-2/+1 * Repair instances, almost all courtesy of bf ;-), of spacesadamw2014-07-301-1/+1 * Convert a bunch of USE_BZIP2 to USES=tar:bzip2adamw2014-07-3017-34/+17 * Rename all patches that contain '::' as a path separator, and useadamw2014-07-303-0/+0 * - Switch audio/libmpd to USES=libtool, drop .la filesamdmi32014-07-291-1/+1 * Remove expired ports:rene2014-07-298-144/+0 * Remove expired ports:rene2014-07-274-61/+0 * net-im/mikutter: Update to 3.0.3swills2014-07-263-41/+690 * - Drop .la files, no dependees require them and they are not used to load plu...amdmi32014-07-262-10/+4 * Remove expired ports:rene2014-07-2517-567/+0 * net/openldap24-*:tijl2014-07-252-2/+2 * Remove quotes that surrounded entire _DESC strings.adamw2014-07-241-1/+1 * - Replace security/gnutls with security/gnutls3 and update to 3.2.15tijl2014-07-239-13/+53 * - Fix skypebuttons.so's entry in the plist.rakuco2014-07-212-3/+6 * Refresh.thierry2014-07-187-15/+17 * Stagify.vanilla2014-07-162-39/+18 * Fix some non default LIB_DEPENDSbapt2014-07-161-3/+3 * Add DOCS option for ports with PORTDOCS in plist.adamw2014-07-162-2/+2 * Add DOCS to OPTIONS_DEFINE to ports that check for PORT_OPTIONS:MDOCS.adamw2014-07-161-1/+1 * Modernize LIB_DEPENDSbapt2014-07-1518-42/+42 * - Move net/linphone-base to replace net/linphone and update to version 3.7.0tijl2014-07-142-8/+11 * Remove indefinite articles and trailing periods from COMMENT, plus minorolgeni2014-07-1014-14/+14 * - Add USES=libtool to net/sofia-sip and bump dependent portstijl2014-07-101-3/+4 * - Convert to USES=libtooltijl2014-07-094-64/+19 * - Add USES=libtool and INSTALL_TARGET=install-striptijl2014-07-092-46/+29 * - Convert to USES=libtooltijl2014-07-093-15/+5 * - Add USES=libtooltijl2014-07-092-3/+6 * - Bump versionvg2014-07-0914-709/+111 * - Convert security/libsodium to USES=libtool and bump dependent portstijl2014-07-071-0/+1 * - Update to 14.0.0sunpoet2014-07-073-198/+5 * Resetting maintainership on ports that have not been staged and without anybapt2014-07-0610-10/+10 * Bump more ports that depend on libsqlite3.so:tijl2014-07-053-3/+3 * Remove NOPORTDOCS.adamw2014-07-051-4/+4 * Convert textproc/aspell to "USES=libtool tar:bzip2" and bump dependent portstijl2014-07-053-3/+3 * Bump PORTREVISION on all ports with USE_SQLITE=yes or USE_SQLITE=3 thattijl2014-07-044-3/+4 * Convert textproc/iksemel to "USES=libtool pathfix" and bump dependent portstijl2014-07-031-1/+1 * Refresh to a recent snapshot.thierry2014-07-0110-26/+36 * - Take maintainershipsunpoet2014-07-011-1/+1 * Remove expired ports:rene2014-06-306-72/+0 * multiple: reset gslin's maintainereadler2014-06-301-1/+1 * - Add a workaround to fix conflicts with tests/__init__.pymiwi2014-06-291-2/+5 * Mark BROKEN: Fails to configureantoine2014-06-281-0/+4 * - Chase database/sqlite3 slib bumpmiwi2014-06-282-2/+2 * - Add staging supportpawel2014-06-283-8/+10 * - Add staging supportpawel2014-06-283-4/+5 * Convert GMAKE to MAKE_CMDbapt2014-06-251-1/+1 * - Remove empty files and directoriesak2014-06-241-0/+0 * Unbreak by adding explicit dependency on pkgconfantoine2014-06-241-1/+1 * Deprecate ports failing to build with new utmpxantoine2014-06-241-0/+3 * Convert to the new LIB_DEPENDS syntax.rakuco2014-06-241-2/+2 * - Remove easy_install dependencymva2014-06-222-5/+30 * - Enable stagedir supportmva2014-06-222-150/+25 * update audacious to 3.5oliver2014-06-211-0/+2 * Fix CATEGORIESantoine2014-06-211-1/+1 * - Update to 2.2.6wen2014-06-212-8/+8 * Stagify.vanilla2014-06-201-1/+0 * 1: Stagify.vanilla2014-06-201-4/+2 * 1: Stagify.vanilla2014-06-202-14/+6 * Stagify.vanilla2014-06-201-7/+4 * Stagify.vanilla2014-06-203-4/+12 * - Stage supportmiwi2014-06-153-14/+24 * Remove net-im/openfire-devel. There's been no -devel versions in months and thegahr2014-06-138-693/+0 * Refresh.thierry2014-06-127-31/+13 * Support LIBS like LDFLAGS.tijl2014-06-112-2/+1 * Remove all the bootstrap files (.bs) from the plists.mat2014-06-101-1/+0 * Fix shebangfix.lx2014-06-101-1/+6 * Stagify.vanilla2014-06-091-8/+7 * Add NCURSES_WIDECHAR to CPPFLAGS to fix the build on -CURRENT.marcus2014-06-091-0/+1 * Fix RUN_DEPENDSantoine2014-06-081-3/+2 * - update to 1.8.2dinoex2014-06-079-12/+27 * Fix packaging with poudriere in strict (-t) mode.kwm2014-06-063-5/+0 * Update to 0.9.4, rc file notice about daemonize, and support for LUAJIT.lx2014-06-053-11/+32 * - Switch security/libotr3 to USES=libtool, drop .la filesamdmi32014-06-042-4/+4 * - Convert USE_BZIP2 to USESamdmi32014-06-042-6/+2 * - Add stage supportmiwi2014-06-042-40/+4 * - Convert security/gsasl to USES=libtool, drop .la filesamdmi32014-06-031-3/+2 * Add an option to show the QR code.thierry2014-06-031-0/+6 * Update to 0.4.0.thierry2014-06-032-4/+4 * Refresh.thierry2014-06-022-4/+4 * - Refreshthierry2014-06-022-4/+7 * Refresh.thierry2014-06-024-25/+28 * Stagify.kwm2014-06-0119-67/+67 * - Stage supportmiwi2014-06-012-3/+1 * - Stage supportmiwi2014-06-012-3/+1 * - Stage supportmiwi2014-06-012-4/+3 * - Stage supportmiwi2014-06-011-1/+0 * - Stage supportmiwi2014-06-011-2/+1 * - Stage supportmiwi2014-06-012-3/+1 * - Stage supportmiwi2014-06-011-1/+0 * - Stage supportmiwi2014-06-012-3/+1 * - Stage supportmiwi2014-06-011-1/+0 * - Stage supportmiwi2014-06-011-1/+0 * - Stage supportmiwi2014-06-011-8/+1 * - Stage supportmiwi2014-06-011-1/+0 * Deprecated some ports that were already marked BROKEN in 2013antoine2014-06-011-0/+2 * Remove expired ports:rene2014-05-316-220/+0 * Remove expired port:kevlo2014-05-306-72/+0 * Fix gettext detection.tijl2014-05-283-3/+4 * net-im/jitsi: Fix DragonFly breakage exposed by stagingmarino2014-05-271-1/+1 * - Convert misc/xosd and dependent ports which need it (deskutils/xneur, polis...amdmi32014-05-272-2/+2 * - Switch to USES=libtool,taramdmi32014-05-272-24/+7 * - Switch to USES=libtool,taramdmi32014-05-272-4/+5 * Replace lang/lua with the new lang/lua51bapt2014-05-261-3/+1 * - Convert gmake,bzip2,xz to USESmiwi2014-05-269-16/+9 * - Switch to USES=libtoolamdmi32014-05-262-4/+6 * Switch Opus to USES=libtool.naddy2014-05-261-0/+1 * - Update to 14.05[1]ashish2014-05-257-144/+329 * Remove expired port:rene2014-05-246-597/+0 * Fix installation with PLUGINS=off config, correcting pkg-plist.mandree2014-05-221-2/+2 * Fix build with SASL option.tijl2014-05-211-0/+1 * Strip libraries.tijl2014-05-213-3/+4 * - Remove "${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH}" from post-patch.tijl2014-05-211-18/+1 * Quote ${CC} and similar variables in MAKE_ARGS.tijl2014-05-211-1/+1 * - Drop maintainershipamdmi32014-05-211-1/+1 * - Update to 3.9.3gahr2014-05-204-17/+22 * - Update to 1.0.10miwi2014-05-181-11/+10 * File format of libncursesw.so is not recognized on FreeBSD-8.4thierry2014-05-181-1/+8 * Convert net-im/libpurple (and slave ports net-im/finch and net-im/pidgin)tijl2014-05-18