
/*
 * =====================================================================================
 *
 *       Filename:  pebble_hmac.h
 *
 *    Description:  PEBBLE definitions for HMAC-SHA256
 *
 *        Version:  1.0
 *        Created:  08/14/2020
 *       Revision:  none
 *       Compiler:  gcc
 *
 *        Company:  Samsung Electronics
 *        Copyright (c) 2020 by Samsung Electronics, All rights reserved.
 *
 * =====================================================================================
 */

#ifndef _PEBBLE_HMAC_H_
#define _PEBBLE_HMAC_H_

/**
 * PEBBLE includes
 */
#include "tz_pebble_interface.h"
#include "pebble_defs.h"


/**
 * @brief
 * unwrap
 *
 * @param[in]  *key         - hash key
 * @param[in]  key_len      - length of key
 * @param[in]  *msg         - pointer to the message to be hashed
 * @param[in]  msg_len      - length of the message to be authenticated
 * @param[out] *digest      - hash result
 * @param[out] *digest_len  - size of the hash result
 *
 * @return PEBBLE status code
 */
uint32_t hmac_sha256_sign(const uint8_t *key, uint32_t key_len,
                          const uint8_t *msg, uint32_t msg_len,
                          uint8_t *digest, uint32_t *digest_len);


#endif /* _PEBBLE_HMAC_H_ */
