WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hmac_wapi_sms4.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2020-2023. All rights reserved.
3 * Description: hmac_wapi_sms4.c的头文件.
4 */
5
6#ifndef __HMAC_WAPI_SMS4_H__
7#define __HMAC_WAPI_SMS4_H__
8
9#include "oal_types.h"
10
11#ifdef __cplusplus
12#if __cplusplus
13extern "C" {
14#endif
15#endif
16
17
18/*****************************************************************************
19 1 头文件包含
20*****************************************************************************/
21
22#undef THIS_FILE_ID
23#define THIS_FILE_ID OAM_FILE_ID_HMAC_WAPI_SMS4_H
24/*****************************************************************************/
25/*****************************************************************************
26 2 宏定义
27*****************************************************************************/
28#define left_one(_B) ((_B) ^ rotl(_B, 2) ^ rotl(_B, 10) ^ rotl(_B, 18) ^ rotl(_B, 24))
29
30#define left_two(_B) ((_B) ^ rotl(_B, 13) ^ rotl(_B, 23))
31
32/*****************************************************************************
33 3 枚举定义
34*****************************************************************************/
35
36
37/*****************************************************************************
38 4 全局变量声明
39*****************************************************************************/
40
41
42/*****************************************************************************
43 5 消息头定义
44*****************************************************************************/
45
46
47/*****************************************************************************
48 6 消息定义
49*****************************************************************************/
50
51
52/*****************************************************************************
53 7 STRUCT定义
54*****************************************************************************/
55
56
57/*****************************************************************************
58 8 UNION定义
59*****************************************************************************/
60
61
62/*****************************************************************************
63 9 OTHERS定义
64*****************************************************************************/
65
66
67/*****************************************************************************
68 10 函数声明
69*****************************************************************************/
70osal_void hmac_sms4_crypt_etc(const osal_u8 *input, osal_u8 *output, const osal_u32 *rk);
72
73#ifdef __cplusplus
74#if __cplusplus
75}
76#endif
77#endif
78
79#endif /* end of hmac_wapi_sms4.h */
osal_void hmac_sms4_crypt_etc(const osal_u8 *input, osal_u8 *output, const osal_u32 *rk)
Definition hmac_wapi_sms4.c:90
osal_void hmac_sms4_keyext_etc(osal_u8 *key, osal_u32 *rk)
Definition hmac_wapi_sms4.c:137
unsigned char osal_u8
Definition osal_types.h:11
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13