1 /* 2 * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef __HI_COMMON_CIPHER_H__ 17 #define __HI_COMMON_CIPHER_H__ 18 19 #ifdef __cplusplus 20 #if __cplusplus 21 extern "C" { 22 #endif 23 #endif /* __cplusplus */ 24 25 #define HI_ERR_CIPHER_NOT_INIT 0x804D0001 26 #define HI_ERR_CIPHER_INVALID_HANDLE 0x804D0002 27 #define HI_ERR_CIPHER_INVALID_POINT 0x804D0003 28 #define HI_ERR_CIPHER_INVALID_PARA 0x804D0004 29 #define HI_ERR_CIPHER_FAILED_INIT 0x804D0005 30 #define HI_ERR_CIPHER_FAILED_GETHANDLE 0x804D0006 31 #define HI_ERR_CIPHER_FAILED_RELEASEHANDLE 0x804D0007 32 #define HI_ERR_CIPHER_FAILED_CONFIGAES 0x804D0008 33 #define HI_ERR_CIPHER_FAILED_CONFIGDES 0x804D0009 34 #define HI_ERR_CIPHER_FAILED_ENCRYPT 0x804D000A 35 #define HI_ERR_CIPHER_FAILED_DECRYPT 0x804D000B 36 #define HI_ERR_CIPHER_BUSY 0x804D000C 37 #define HI_ERR_CIPHER_NO_AVAILABLE_RNG 0x804D000D 38 #define HI_ERR_CIPHER_FAILED_MEM 0x804D000E 39 #define HI_ERR_CIPHER_UNAVAILABLE 0x804D000F 40 #define HI_ERR_CIPHER_OVERFLOW 0x804D0010 41 #define HI_ERR_CIPHER_HARD_STATUS 0x804D0011 42 #define HI_ERR_CIPHER_TIMEOUT 0x804D0012 43 #define HI_ERR_CIPHER_UNSUPPORTED 0x804D0013 44 #define HI_ERR_CIPHER_REGISTER_IRQ 0x804D0014 45 #define HI_ERR_CIPHER_ILLEGAL_UUID 0x804D0015 46 #define HI_ERR_CIPHER_ILLEGAL_KEY 0x804D0016 47 #define HI_ERR_CIPHER_INVALID_ADDR 0x804D0017 48 #define HI_ERR_CIPHER_INVALID_LENGTH 0x804D0018 49 #define HI_ERR_CIPHER_ILLEGAL_DATA 0x804D0019 50 #define HI_ERR_CIPHER_RSA_SIGN 0x804D001A 51 #define HI_ERR_CIPHER_RSA_VERIFY 0x804D001B 52 #define HI_ERR_CIPHER_MEMSET_S_FAILED 0x804D001C 53 #define HI_ERR_CIPHER_MEMCPY_S_FAILED 0x804D001D 54 #define HI_ERR_CIPHER_RSA_CRYPT_FAILED 0x804D001E 55 56 #ifdef __cplusplus 57 #if __cplusplus 58 } 59 #endif 60 #endif /* __cplusplus */ 61 62 #endif /* __HI_COMMON_CIPHER_H__ */ 63