Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
hmac.h31 linesDownload Raw Back to common
1/*-------------------------------------------------------------------------2 *3 * hmac.h4 *	  Generic headers for HMAC5 *6 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group7 * Portions Copyright (c) 1994, Regents of the University of California8 *9 * IDENTIFICATION10 *		  src/include/common/hmac.h11 *12 *-------------------------------------------------------------------------13 */14 15#ifndef PG_HMAC_H16#define PG_HMAC_H17 18#include "common/cryptohash.h"19 20/* opaque context, private to each HMAC implementation */21typedef struct pg_hmac_ctx pg_hmac_ctx;22 23extern pg_hmac_ctx *pg_hmac_create(pg_cryptohash_type type);24extern int	pg_hmac_init(pg_hmac_ctx *ctx, const uint8 *key, size_t len);25extern int	pg_hmac_update(pg_hmac_ctx *ctx, const uint8 *data, size_t len);26extern int	pg_hmac_final(pg_hmac_ctx *ctx, uint8 *dest, size_t len);27extern void pg_hmac_free(pg_hmac_ctx *ctx);28extern const char *pg_hmac_error(pg_hmac_ctx *ctx);29 30#endif							/* PG_HMAC_H */31