#ifndef SPX_HASH_H
#define SPX_HASH_H

#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseMemoryLib.h>
#include <Uefi.h>

#include "context.h"
#include "params.h"

#define initialize_hash_function SPX_NAMESPACE(initialize_hash_function)
VOID initialize_hash_function(spx_ctx *ctx);

#define prf_addr SPX_NAMESPACE(prf_addr)
VOID prf_addr(UINT8 *out, const spx_ctx *ctx,
              const UINT32 addr[8]);

#define gen_message_random SPX_NAMESPACE(gen_message_random)
VOID gen_message_random(UINT8 *R, const UINT8 *sk_prf,
                        const UINT8 *optrand,
                        const UINT8 *m, UINT64 mlen,
                        const spx_ctx *ctx);

#define hash_message SPX_NAMESPACE(hash_message)
VOID hash_message(UINT8 *digest, UINT64 *tree, UINT32 *leaf_idx,
                  const UINT8 *R, const UINT8 *pk,
                  const UINT8 *m, UINT64 mlen,
                  const spx_ctx *ctx);

#endif
