doc: Fix section of functions age(xid) and mxid_age(xid)
[pgsql.git] / src / include / common / hmac.h
blob1b93aa2892b704afcf5ff1279d015cf5db91d74a
1 /*-------------------------------------------------------------------------
3 * hmac.h
4 * Generic headers for HMAC
6 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * IDENTIFICATION
10 * src/include/common/hmac.h
12 *-------------------------------------------------------------------------
15 #ifndef PG_HMAC_H
16 #define PG_HMAC_H
18 #include "common/cryptohash.h"
20 /* opaque context, private to each HMAC implementation */
21 typedef struct pg_hmac_ctx pg_hmac_ctx;
23 extern pg_hmac_ctx *pg_hmac_create(pg_cryptohash_type type);
24 extern int pg_hmac_init(pg_hmac_ctx *ctx, const uint8 *key, size_t len);
25 extern int pg_hmac_update(pg_hmac_ctx *ctx, const uint8 *data, size_t len);
26 extern int pg_hmac_final(pg_hmac_ctx *ctx, uint8 *dest, size_t len);
27 extern void pg_hmac_free(pg_hmac_ctx *ctx);
28 extern const char *pg_hmac_error(pg_hmac_ctx *ctx);
30 #endif /* PG_HMAC_H */