123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef HMAC_SHA2_H
- #define HMAC_SHA2_H
- #include "crypto/sha256.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct {
- sha256_ctx ctx;
- #if 0
- sha256_ctx ctx_inside;
- sha256_ctx ctx_outside;
- #endif
- #if 0
-
- sha256_ctx ctx_inside_reinit;
- sha256_ctx ctx_outside_reinit;
- #endif
- #if 0
- unsigned char block_ipad[SHA256_BLOCK_SIZE];
- unsigned char block_opad[SHA256_BLOCK_SIZE];
- #endif
- } hmac_sha256_ctx;
- void hmac_sha256_init(hmac_sha256_ctx *ctx, const unsigned char *key,
- unsigned int key_size);
- void hmac_sha256_update(hmac_sha256_ctx *ctx, const unsigned char *message,
- unsigned int message_len);
- void hmac_sha256_final(hmac_sha256_ctx *ctx, unsigned char *mac,
- unsigned int mac_size);
- void hmac_sha256_ogay(const unsigned char *key, unsigned int key_size,
- const unsigned char *message, unsigned int message_len,
- unsigned char *mac, unsigned mac_size);
- #ifdef __cplusplus
- }
- #endif
- #endif
|