about summary refs log tree commit diff
path: root/src/libutil/md5.h
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-02-13T19·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-02-13T19·52+0000
commitd6f586d0eaa9344a99248cc4dfb7825972f2a174 (patch)
treedb144d931fabfc85ad089591393886a9694e48c2 /src/libutil/md5.h
parente8475bbd5b0c5505bb0536929e89efc8b0d4da5c (diff)
* Optional switch "--with-openssl=<PATH>" to use OpenSSL's
  implementations of MD5, SHA-1 and SHA-256.  The main benefit is that
  we get assembler-optimised implementations of MD5 and SHA-1 (though
  not SHA-256 (at least on x86), unfortunately).  OpenSSL's SHA-1
  implementation on Intel is twice as fast as ours.

Diffstat (limited to 'src/libutil/md5.h')
-rw-r--r--src/libutil/md5.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libutil/md5.h b/src/libutil/md5.h
index 4b18733836..cecbf8bbfc 100644
--- a/src/libutil/md5.h
+++ b/src/libutil/md5.h
@@ -26,7 +26,7 @@ typedef uint32_t md5_uint32;
 typedef uintptr_t md5_uintptr;
 
 /* Structure to save state of computation between the single steps.  */
-struct md5_ctx
+struct MD5_CTX
 {
   md5_uint32 A;
   md5_uint32 B;
@@ -45,21 +45,20 @@ struct md5_ctx
 
 /* Initialize structure containing state of computation.
    (RFC 1321, 3.3: Step 3)  */
-extern void md5_init_ctx __P ((struct md5_ctx *ctx));
+extern void MD5_Init __P ((struct MD5_CTX *ctx));
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is necessary that LEN is a multiple of 64!!! */
 extern void md5_process_block __P ((const void *buffer, size_t len,
-				      struct md5_ctx *ctx));
+				      struct MD5_CTX *ctx));
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is NOT required that LEN is a multiple of 64.  */
-extern void md5_process_bytes __P ((const void *buffer, size_t len,
-				      struct md5_ctx *ctx));
+extern void MD5_Update __P ((struct MD5_CTX *ctx, const void *buffer, size_t len));
 
 /* Process the remaining bytes in the buffer and put result from CTX
    in first 16 bytes following RESBUF.  The result is always in little
@@ -68,7 +67,7 @@ extern void md5_process_bytes __P ((const void *buffer, size_t len,
 
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
-extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
+extern void *MD5_Final __P ((void *resbuf, struct MD5_CTX *ctx));
 
 
 /* Put result from CTX in first 16 bytes following RESBUF.  The result is
@@ -77,7 +76,7 @@ extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
 
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
-extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
+extern void *md5_read_ctx __P ((const struct MD5_CTX *ctx, void *resbuf));
 
 
 #endif /* md5.h */