openssl/hmac.h提供一下
时间: 2023-09-24 09:08:20 浏览: 130
delphi http 或 sha256/hmac_sha256使用的dll(libeay32/ssleay32)
5星 · 资源好评率100%
内容:
#ifndef OPENSSL_HEADER_HMAC_H
#define OPENSSL_HEADER_HMAC_H
#include <openssl/macros.h>
#if defined(__cplusplus)
extern "C" {
#endif
/* HMAC functions */
/* HMAC_Init_ex sets up |ctx| to use |key| as the key for HMAC and |md| as the
* hash function. It returns one. */
OPENSSL_EXPORT int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, size_t key_len,
const EVP_MD *md, ENGINE *impl);
/* HMAC_Init sets up |ctx| to use |key| as the key for HMAC and |md| as the hash
* function. It returns one. */
OPENSSL_EXPORT int HMAC_Init(HMAC_CTX *ctx, const void *key, size_t key_len,
const EVP_MD *md);
/* HMAC_Update hashes |len| bytes from |data| into the current HMAC context. It
* returns one. */
OPENSSL_EXPORT int HMAC_Update(HMAC_CTX *ctx, const void *data, size_t len);
/* HMAC_Final writes the HMAC of the data passed to |HMAC_Update| into |out|
* and clears |ctx|. It returns one. */
OPENSSL_EXPORT int HMAC_Final(HMAC_CTX *ctx, uint8_t *out, unsigned int *out_len);
/* HMAC takes the given hash function, |md|, computes the HMAC of |len| bytes
* from |data| with |key_len| bytes from |key| and writes the HMAC to |out|. It
* returns |out| or NULL on error. */
OPENSSL_EXPORT uint8_t *HMAC(const EVP_MD *md, const void *key, size_t key_len,
const uint8_t *data, size_t len, uint8_t *out,
unsigned int *out_len);
/* HMAC_CTX_copy copies |in| into |out|. It returns one. */
OPENSSL_EXPORT int HMAC_CTX_copy(HMAC_CTX *out, const HMAC_CTX *in);
/* HMAC_CTX_free frees any memory used by |ctx|. */
OPENSSL_EXPORT void HMAC_CTX_free(HMAC_CTX *ctx);
#if defined(__cplusplus)
} /* extern C */
#endif
#endif /* OPENSSL_HEADER_HMAC_H */
阅读全文