Blame lib/nettle/gost/hmac-gost.h

Packit aea12f
/* hmac-gost.h
Packit aea12f
Packit aea12f
   HMAC message authentication code (RFC-2104).
Packit aea12f
Packit aea12f
   Copyright (C) 2001, 2002 Niels Möller
Packit aea12f
Packit aea12f
   This file is part of GNU Nettle.
Packit aea12f
Packit aea12f
   GNU Nettle is free software: you can redistribute it and/or
Packit aea12f
   modify it under the terms of either:
Packit aea12f
Packit aea12f
     * the GNU Lesser General Public License as published by the Free
Packit aea12f
       Software Foundation; either version 3 of the License, or (at your
Packit aea12f
       option) any later version.
Packit aea12f
Packit aea12f
   or
Packit aea12f
Packit aea12f
     * the GNU General Public License as published by the Free
Packit aea12f
       Software Foundation; either version 2 of the License, or (at your
Packit aea12f
       option) any later version.
Packit aea12f
Packit aea12f
   or both in parallel, as here.
Packit aea12f
Packit aea12f
   GNU Nettle is distributed in the hope that it will be useful,
Packit aea12f
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit aea12f
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit aea12f
   General Public License for more details.
Packit aea12f
Packit aea12f
   You should have received copies of the GNU General Public License and
Packit aea12f
   the GNU Lesser General Public License along with this program.  If
Packit aea12f
   not, see https://www.gnu.org/licenses/.
Packit aea12f
*/
Packit aea12f
Packit aea12f
#ifndef GNUTLS_LIB_NETTLE_GOST_HMAC_GOST_H
Packit aea12f
#define GNUTLS_LIB_NETTLE_GOST_HMAC_GOST_H
Packit aea12f
Packit Service 991b93
#include "config.h"
Packit Service 991b93
Packit aea12f
#include <nettle/hmac.h>
Packit aea12f
Packit Service 991b93
#ifndef HAVE_NETTLE_GOSTHASH94CP_UPDATE
Packit aea12f
#include "gosthash94.h"
Packit Service 991b93
#endif
Packit Service 991b93
#ifndef HAVE_NETTLE_STREEBOG512_UPDATE
Packit aea12f
#include "streebog.h"
Packit Service 991b93
#endif
Packit aea12f
Packit aea12f
#ifdef __cplusplus
Packit aea12f
extern "C" {
Packit aea12f
#endif
Packit aea12f
Packit aea12f
/* Namespace mangling */
Packit Service 991b93
#ifndef HAVE_NETTLE_GOSTHASH94CP_UPDATE
Packit aea12f
#define hmac_gosthash94cp_set_key _gnutls_hmac_gosthash94cp_set_key
Packit aea12f
#define hmac_gosthash94cp_update _gnutls_hmac_gosthash94cp_update
Packit aea12f
#define hmac_gosthash94cp_digest _gnutls_hmac_gosthash94cp_digest
Packit Service 991b93
#endif
Packit Service 991b93
#ifndef HAVE_NETTLE_STREEBOG512_UPDATE
Packit aea12f
#define hmac_streebog256_set_key _gnutls_hmac_streebog256_set_key
Packit aea12f
#define hmac_streebog256_digest _gnutls_hmac_streebog256_digest
Packit aea12f
#define hmac_streebog512_set_key _gnutls_hmac_streebog512_set_key
Packit aea12f
#define hmac_streebog512_update _gnutls_hmac_streebog512_update
Packit aea12f
#define hmac_streebog512_digest _gnutls_hmac_streebog512_digest
Packit Service 991b93
#endif
Packit aea12f
Packit aea12f
/* hmac-gosthash94 */
Packit Service 991b93
#ifndef HAVE_NETTLE_GOSTHASH94CP_UPDATE
Packit aea12f
struct hmac_gosthash94cp_ctx HMAC_CTX(struct gosthash94cp_ctx);
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_gosthash94cp_set_key(struct hmac_gosthash94cp_ctx *ctx,
Packit aea12f
			  size_t key_length, const uint8_t *key);
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_gosthash94cp_update(struct hmac_gosthash94cp_ctx *ctx,
Packit aea12f
			 size_t length, const uint8_t *data);
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_gosthash94cp_digest(struct hmac_gosthash94cp_ctx *ctx,
Packit aea12f
			 size_t length, uint8_t *digest);
Packit Service 991b93
#endif
Packit aea12f
Packit aea12f
Packit aea12f
/* hmac-streebog */
Packit Service 991b93
#ifndef HAVE_NETTLE_STREEBOG512_UPDATE
Packit aea12f
struct hmac_streebog512_ctx HMAC_CTX(struct streebog512_ctx);
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_streebog512_set_key(struct hmac_streebog512_ctx *ctx,
Packit aea12f
		    size_t key_length, const uint8_t *key);
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_streebog512_update(struct hmac_streebog512_ctx *ctx,
Packit aea12f
		   size_t length, const uint8_t *data);
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_streebog512_digest(struct hmac_streebog512_ctx *ctx,
Packit aea12f
		   size_t length, uint8_t *digest);
Packit aea12f
Packit aea12f
#define hmac_streebog256_ctx hmac_streebog512_ctx
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_streebog256_set_key(struct hmac_streebog256_ctx *ctx,
Packit aea12f
		    size_t key_length, const uint8_t *key);
Packit aea12f
Packit aea12f
#define hmac_streebog256_update hmac_streebog512_update
Packit aea12f
Packit aea12f
void
Packit aea12f
hmac_streebog256_digest(struct hmac_streebog256_ctx *ctx,
Packit aea12f
		   size_t length, uint8_t *digest);
Packit Service 991b93
#endif
Packit aea12f
Packit aea12f
#ifdef __cplusplus
Packit aea12f
}
Packit aea12f
#endif
Packit aea12f
Packit aea12f
#endif /* GNUTLS_LIB_NETTLE_GOST_HMAC_GOST_H */