46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
|
/* USER CODE BEGIN Header */
|
||
|
/**
|
||
|
******************************************************************************
|
||
|
* File Name : sts_cmox_hmac_sha.h *
|
||
|
* @author Yunhorn (r) Technology Limited Application Team *
|
||
|
* @brief Yunhorn (r) SmarToilets (r) HMAC-SHA1 Process file. *
|
||
|
* Description : Hash Message Authentication Code SHA *
|
||
|
******************************************************************************
|
||
|
* @attention
|
||
|
*
|
||
|
* Copyright (c) 2023 Yunhorn Technology Limited.
|
||
|
* Copyright (c) 2023 Shenzhen Yunhorn Technology Co., Ltd.
|
||
|
* All rights reserved.
|
||
|
* This software is licensed under terms that can be found in the LICENSE file
|
||
|
* in the root directory of this software component.
|
||
|
* If no LICENSE file comes with this software, it is provided AS-IS. *
|
||
|
******************************************************************************
|
||
|
*/
|
||
|
/* USER CODE END Header */
|
||
|
|
||
|
#ifndef __sts_cmox_hmac_sha_h
|
||
|
#define __sts_cmox_hmac_sha_h
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
#include "cmox_crypto.h"
|
||
|
|
||
|
typedef struct {
|
||
|
uint8_t hmac_tag[20];
|
||
|
uint8_t hmac_tag_size;
|
||
|
uint8_t ac_pass;
|
||
|
} hmac_result_t;
|
||
|
|
||
|
void STS_HMAC_TESTING(void);
|
||
|
uint32_t sts_hmac_sha1(const uint8_t *Key, int key_length, const uint8_t *Message, int message_length, hmac_result_t *hmac_result);
|
||
|
uint32_t sts_hmac_verify(void);
|
||
|
|
||
|
#endif
|
||
|
/**
|
||
|
* @}
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @}
|
||
|
*/
|