X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsha512.h;h=ea85194fb59f731738a46f2e3af55fa328a8230a;hb=043938ff1857f8583d6fd0c5faea0598d4e1982e;hp=ed12d545c2119ad05d134f2eb7db519620ae85d9;hpb=3054279c0cca4c1f9c61997f924685b1d70c2353;p=gnulib.git diff --git a/lib/sha512.h b/lib/sha512.h index ed12d545c..ea85194fb 100644 --- a/lib/sha512.h +++ b/lib/sha512.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA512 and SHA384 sum library functions. - Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,10 @@ # include "u64.h" +# ifdef __cplusplus +extern "C" { +# endif + /* Structure to save state of computation between the single steps. */ struct sha512_ctx { @@ -44,14 +48,14 @@ extern void sha384_init_ctx (struct sha512_ctx *ctx); starting at BUFFER. It is necessary that LEN is a multiple of 128!!! */ extern void sha512_process_block (const void *buffer, size_t len, - struct sha512_ctx *ctx); + struct sha512_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 128. */ extern void sha512_process_bytes (const void *buffer, size_t len, - struct sha512_ctx *ctx); + struct sha512_ctx *ctx); /* Process the remaining bytes in the buffer and put result from CTX in first 64 (48) bytes following RESBUF. The result is always in little @@ -84,4 +88,8 @@ extern int sha384_stream (FILE *stream, void *resblock); extern void *sha512_buffer (const char *buffer, size_t len, void *resblock); extern void *sha384_buffer (const char *buffer, size_t len, void *resblock); +# ifdef __cplusplus +} +# endif + #endif