• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #ifndef __HI_COMMON_CIPHER_H__
20 #define __HI_COMMON_CIPHER_H__
21 
22 #ifdef __cplusplus
23 #if __cplusplus
24 extern "C" {
25 #endif
26 #endif /* __cplusplus */
27 
28 #define  HI_ERR_CIPHER_NOT_INIT                             0x804D0001
29 #define  HI_ERR_CIPHER_INVALID_HANDLE                       0x804D0002
30 #define  HI_ERR_CIPHER_INVALID_POINT                        0x804D0003
31 #define  HI_ERR_CIPHER_INVALID_PARA                         0x804D0004
32 #define  HI_ERR_CIPHER_FAILED_INIT                          0x804D0005
33 #define  HI_ERR_CIPHER_FAILED_GETHANDLE                     0x804D0006
34 #define  HI_ERR_CIPHER_FAILED_RELEASEHANDLE                 0x804D0007
35 #define  HI_ERR_CIPHER_FAILED_CONFIGAES                     0x804D0008
36 #define  HI_ERR_CIPHER_FAILED_CONFIGDES                     0x804D0009
37 #define  HI_ERR_CIPHER_FAILED_ENCRYPT                       0x804D000A
38 #define  HI_ERR_CIPHER_FAILED_DECRYPT                       0x804D000B
39 #define  HI_ERR_CIPHER_BUSY                                 0x804D000C
40 #define  HI_ERR_CIPHER_NO_AVAILABLE_RNG                     0x804D000D
41 #define  HI_ERR_CIPHER_FAILED_MEM                           0x804D000E
42 #define  HI_ERR_CIPHER_UNAVAILABLE                          0x804D000F
43 #define  HI_ERR_CIPHER_OVERFLOW                             0x804D0010
44 #define  HI_ERR_CIPHER_HARD_STATUS                          0x804D0011
45 #define  HI_ERR_CIPHER_TIMEOUT                              0x804D0012
46 #define  HI_ERR_CIPHER_UNSUPPORTED                          0x804D0013
47 #define  HI_ERR_CIPHER_REGISTER_IRQ                         0x804D0014
48 #define  HI_ERR_CIPHER_ILLEGAL_UUID                         0x804D0015
49 #define  HI_ERR_CIPHER_ILLEGAL_KEY                          0x804D0016
50 #define  HI_ERR_CIPHER_INVALID_ADDR                         0x804D0017
51 #define  HI_ERR_CIPHER_INVALID_LENGTH                       0x804D0018
52 #define  HI_ERR_CIPHER_ILLEGAL_DATA                         0x804D0019
53 #define  HI_ERR_CIPHER_RSA_SIGN                             0x804D001A
54 #define  HI_ERR_CIPHER_RSA_VERIFY                           0x804D001B
55 #define  HI_ERR_CIPHER_MEMSET_S_FAILED                      0x804D001C
56 #define  HI_ERR_CIPHER_MEMCPY_S_FAILED                      0x804D001D
57 #define  HI_ERR_CIPHER_RSA_CRYPT_FAILED                     0x804D001E
58 
59 #ifdef __cplusplus
60 #if __cplusplus
61 }
62 #endif
63 #endif /* __cplusplus */
64 
65 #endif /* __HI_COMMON_CIPHER_H__ */
66