#ifndef OSSL_CRYPTO_HMAC_LOCAL_H
#define OSSL_CRYPTO_HMAC_LOCAL_H
#include "internal/common.h"
#include "internal/numbers.h"
#include "openssl/sha.h"
#define HMAC_MAX_MD_CBLOCK_SIZE 144
struct hmac_ctx_st {
const EVP_MD *md;
EVP_MD_CTX *md_ctx;
EVP_MD_CTX *i_ctx;
EVP_MD_CTX *o_ctx;
union {
int dummy;
#ifdef OPENSSL_HMAC_S390X
struct {
unsigned int fc;
int blk_size;
int ikp;
int iimp;
unsigned char *buf;
size_t size;
size_t num;
union {
OSSL_UNION_ALIGN;
struct {
uint32_t h[8];
uint64_t imbl;
unsigned char key[64];
} hmac_224_256;
struct {
uint64_t h[8];
uint128_t imbl;
unsigned char key[128];
} hmac_384_512;
} param;
} s390x;
#endif
} plat;
};
#ifdef OPENSSL_HMAC_S390X
#define HMAC_S390X_BUF_NUM_BLOCKS 64
int s390x_HMAC_init(HMAC_CTX *ctx, const void *key, int key_len, ENGINE *impl);
int s390x_HMAC_update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
int s390x_HMAC_final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
int s390x_HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
int s390x_HMAC_CTX_cleanup(HMAC_CTX *ctx);
#endif
#endif