X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgc-gnulib.c;h=573cc9815a435829737cf3857965a9ab9d125d1f;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=67c4e6b23b1c43c358711621f9d1ca8eceda9eb9;hpb=1602f0afed21be664fcf5c42d59db07cc22c56d6;p=gnulib.git diff --git a/lib/gc-gnulib.c b/lib/gc-gnulib.c index 67c4e6b23..573cc9815 100644 --- a/lib/gc-gnulib.c +++ b/lib/gc-gnulib.c @@ -1,5 +1,5 @@ /* gc-gnulib.c --- Common gnulib internal crypto interface functions - * Copyright (C) 2002-2012 Free Software Foundation, Inc. + * Copyright (C) 2002-2014 Free Software Foundation, Inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published @@ -12,9 +12,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this file; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. + * along with this file; if not, see . * */ @@ -50,7 +48,7 @@ #ifdef GNULIB_GC_SHA1 # include "sha1.h" #endif -#if defined(GNULIB_GC_HMAC_MD5) || defined(GNULIB_GC_HMAC_SHA1) +#if defined(GNULIB_GC_HMAC_MD5) || defined(GNULIB_GC_HMAC_SHA1) || defined(GNULIB_GC_HMAC_SHA256) || defined(GNULIB_GC_HMAC_SHA512) # include "hmac.h" #endif @@ -916,3 +914,23 @@ gc_hmac_sha1 (const void *key, size_t keylen, return GC_OK; } #endif + +#ifdef GNULIB_GC_HMAC_SHA256 +Gc_rc +gc_hmac_sha256 (const void *key, size_t keylen, + const void *in, size_t inlen, char *resbuf) +{ + hmac_sha256 (key, keylen, in, inlen, resbuf); + return GC_OK; +} +#endif + +#ifdef GNULIB_GC_HMAC_SHA512 +Gc_rc +gc_hmac_sha512 (const void *key, size_t keylen, + const void *in, size_t inlen, char *resbuf) +{ + hmac_sha512 (key, keylen, in, inlen, resbuf); + return GC_OK; +} +#endif