X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsha256.h;h=9f6bf14bf0c7f806f89edd969194bd148611039c;hb=ec2348da1754e807233e33beefdb732a119e4adc;hp=a63b2015d80c85069cbd46a1b78ff1a6940659b7;hpb=3054279c0cca4c1f9c61997f924685b1d70c2353;p=gnulib.git diff --git a/lib/sha256.h b/lib/sha256.h index a63b2015d..9f6bf14bf 100644 --- a/lib/sha256.h +++ b/lib/sha256.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA256 and SHA224 sum library functions. - Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2011 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 @@ -21,6 +21,10 @@ # include # include +# ifdef __cplusplus +extern "C" { +# endif + /* Structure to save state of computation between the single steps. */ struct sha256_ctx { @@ -43,14 +47,14 @@ extern void sha224_init_ctx (struct sha256_ctx *ctx); starting at BUFFER. It is necessary that LEN is a multiple of 64!!! */ extern void sha256_process_block (const void *buffer, size_t len, - struct sha256_ctx *ctx); + struct sha256_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 sha256_process_bytes (const void *buffer, size_t len, - struct sha256_ctx *ctx); + struct sha256_ctx *ctx); /* Process the remaining bytes in the buffer and put result from CTX in first 32 (28) bytes following RESBUF. The result is always in little @@ -80,4 +84,8 @@ extern int sha224_stream (FILE *stream, void *resblock); extern void *sha256_buffer (const char *buffer, size_t len, void *resblock); extern void *sha224_buffer (const char *buffer, size_t len, void *resblock); +# ifdef __cplusplus +} +# endif + #endif