2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 * Copyright (C) 2009 Equinox Software Inc.
21 @brief Header for digest functions.
23 In each case, the input is a nul-terminated character string. The result is returned
24 in a structure provided by the calling code, both in a binary buffer and in a
25 nul-terminated string of hex characters encoding the same value.
36 @brief Contains an SHA1 digest.
39 unsigned char binary[ 20 ]; /**< Binary SHA1 digest. */
40 char hex[ 41 ]; /**< Same digest, in the form of a hex string. */
44 @brief Contains an MD5 digest.
47 unsigned char binary[ 16 ]; /**< Binary MD5 digest. */
48 char hex[ 33 ]; /**< Same digest, in the form of a hex string. */
51 void osrf_sha1_digest( osrfSHA1Buffer* result, const char *str );
53 void osrf_sha1_digest_fmt( osrfSHA1Buffer* result, const char* str, ... );
55 void osrf_md5_digest( osrfMD5Buffer* result, const char *str );
57 void osrf_md5_digest_fmt( osrfMD5Buffer* result, const char* str, ... );