⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stm_api.h

📁 RSA C++源代码DEMO,附加DESMD5等众多算法
💻 H
📖 第 1 页 / 共 5 页
字号:
#define STM_ERR_CARD_DECREASE                 0x268
#define STM_ERR_CARD_SECURE_INCREASE          0x269
#define STM_ERR_CARD_SECURE_DECREASE          0x26a
#define STM_ERR_CARD_VERIFY_PIN               0x26b
#define STM_ERR_CARD_CHANGE_PIN               0x26c
#define STM_ERR_CARD_UNBLOCK_PIN              0x26d
#define STM_ERR_CARD_REGISTER_DF              0x26e
#define STM_ERR_CARD_CREATE                   0x26f
#define STM_ERR_CARD_DELETE_MF                0x270
#define STM_ERR_CARD_CRYPT                    0x271
#define STM_ERR_CARD_EXCHANGE_CHALL           0x272
#define STM_ERR_CARD_INSTALL_KEY              0x273
#define STM_ERR_CARD_UPDATE_KEY               0x274
#define STM_ERR_CARD_READ_KEY_STATUS          0x275
#define STM_ERR_CARD_PUT_DATA                 0x276
/* SPK2.1 */
#define STM_ERR_CARD_COMPUTE_HASH             0x277
#define STM_ERR_CARD_SET_HASH                 0x278
#define STM_ERR_CARD_PUT_HASH                 0x279
#define STM_ERR_CARD_COMPUTE_SIGNATURE        0x27a
#define STM_ERR_CARD_VERIFY_SIGNATURE         0x27b
#define STM_ERR_CARD_SET_SECURITY_ENV         0x27c
#define STM_ERR_CARD_ERASE_OBJECT_FILE        0x27d
/* SPK2.2 */
#define STM_ERR_CARD_GENERATE_RSA_KEY         0x27e
#define STM_ERR_CARD_DECIPHER                 0x27f
#define STM_ERR_CARD_EXT_AUTH_ASYM            0x280
#define STM_ERR_CARD_INT_AUTH_ASYM            0x281
#define STM_ERR_CARD_ENCIPHER                 0x282
/* SRF1.3 (Air 1.0) */
#define STM_ERR_CARD_REQUEST_PURSE_ACCOUNT    0x283
#define STM_ERR_CARD_PURSE_TRANSACTION        0x284
/* GSM Phase2 */
#define STM_ERR_CARD_DELETE_FILE              0x285
/* SPK2.3 */
#define STM_ERR_CARD_READ_PUBLIC_KEY_RECORD    0x286
#define STM_ERR_CARD_READ_PUBLIC_KEY_SIGNATURE 0x287
#define STM_ERR_CARD_VERIFY_CERTIFICATE        0x288
#define STM_ERR_CARD_VERIFY_BIOMETRIC          0x289

/* card SW1/SW2 errors    */
#define STM_ERR_CARD_NORMAL_PROC_OBSOLETE     0x2a0
#define STM_ERR_CARD_NO_RESPONSE_BYTES_AVAIL  0x2a1
#define STM_ERR_CARD_REPONSE_BYTES_AVAIL      0x2a2
#define STM_ERR_CARD_FILE_NOT_CHANGED         0x2a3
#define STM_ERR_CARD_RET_DATA_MAY_CORRUPT     0x2a4
#define STM_ERR_CARD_END_OF_FILE              0x2a5
#define STM_ERR_CARD_FILE_INVALIDATED         0x2a6
#define STM_ERR_CARD_FCI_NOT_FORMATED         0x2a7
#define STM_ERR_CARD_COUNTER_PROVIDED_BY_X    0x2a8
#define STM_ERR_CARD_FILE_CHANGED             0x2a9
#define STM_ERR_CARD_FILLED_BY_LAST_WRITE     0x2aa
#define STM_ERR_CARD_MEMORY_UNCHANGED         0x2ab
#define STM_ERR_CARD_MEMORY_CHANGED           0x2ac 
#define STM_ERR_CARD_MEMORY_FAILURE           0x2ad
#define STM_ERR_CARD_WRONG_LENGTH             0x2ae
#define STM_ERR_CARD_CLASS_BYTE               0x2af
#define STM_ERR_CARD_LOG_CHN_NOT_SUPPORTED    0x2b0
#define STM_ERR_CARD_SM_NOT_SUPPORTED         0x2b1
#define STM_ERR_CARD_CMD_NOT_ALLOWED          0x2b2
#define STM_ERR_CARD_CMD_INCOMPATIBLE         0x2b3
#define STM_ERR_CARD_CMD_SECURITY_STATE       0x2b4
#define STM_ERR_CARD_AUTH_CMD_BLOCKED         0x2b5
#define STM_ERR_CARD_REF_DATA_INVALID         0x2b6
#define STM_ERR_CARD_COND_NOT_SATISFIED       0x2b7
#define STM_ERR_CARD_CMD_NO_CURRENT_EF        0x2b8
#define STM_ERR_CARD_SM_OBJECTS_MISSING       0x2b9
#define STM_ERR_CARD_SM_OBJECTS_INCORRECT     0x2ba
#define STM_ERR_CARD_PARAMETER                0x2bb
#define STM_ERR_CARD_DATA_FIELD_PARAM         0x2bc
#define STM_ERR_CARD_FUNC_NOT_SUPPORTED       0x2bd
#define STM_ERR_CARD_FILE_NOT_FOUND           0x2be
#define STM_ERR_CARD_RECORD_NOT_FOUND         0x2bf
#define STM_ERR_CARD_NOT_ENOUGH_FILE_SPACE    0x2c0
#define STM_ERR_CARD_LC_INCONSISTENT_TLV      0x2c1
#define STM_ERR_CARD_INCORRECT_P1_P2          0x2c2
#define STM_ERR_CARD_LC_INCONSISTENT          0x2c3
#define STM_ERR_CARD_REF_DATA_NOT_FOUND       0x2c4
#define STM_ERR_CARD_WRONG_LE_FIELD           0x2c5
#define STM_ERR_CARD_WRONG_INS_CODE           0x2c6
#define STM_ERR_CARD_CLASS_NOT_SUPPORTED      0x2c7
#define STM_ERR_CARD_UNKOWN                   0x2c8

/* S1.1 SW-Errors:    */
#define STM_ERR_CARD_FILE_LOCKED                        0x2c9
#define STM_ERR_CARD_EDC_OR_WRITE                       0x2ca
#define STM_ERR_CARD_INVALID_STATE                      0x2cb
#define STM_ERR_CARD_INVALID_PUK_RECORD                 0x2cc
#define STM_ERR_CARD_NO_FILE_SELECTED                   0x2cd
#define STM_ERR_CARD_KEY_LOCKED                         0x2ce
#define STM_ERR_CARD_MF_NOT_SELECTED_OR_FILE_EXIST      0x2cf
#define STM_ERR_CARD_INVALID_KEY_TYPE                   0x2d0
#define STM_ERR_CARD_INVALID_KEY_TYPE_OR_NO_RAND        0x2d1
#define STM_ERR_CARD_MF_NOT_SELECTED                    0x2d2
#define STM_ERR_CARD_INVALID_EF_ID                      0x2d3
#define STM_ERR_CARD_KEY_NOT_FOUND                      0x2d4
#define STM_ERR_CARD_DF_ALREADY_EXISTS                  0x2d5
#define STM_ERR_CARD_FILE_OR_KEY_NOT_FOUND              0x2d6
#define STM_ERR_CARD_PIN_NOT_FOUND                      0x2d7
#define STM_ERR_CARD_UNDERFLOW                          0x2d8
#define STM_ERR_CARD_OVERFLOW                           0x2d9       
#define STM_ERR_CARD_INVALID_DF_ID                      0x2da       
#define STM_ERR_CARD_SYSTEM                             0x2db

/* S1.2 SW-Errors:    */                   
#define STM_ERR_CARD_GET_RESPONSE                       0x2dc
#define STM_ERR_CARD_CANT_OVERWRITE_KEY                 0x2dd
#define STM_ERR_CARD_NO_DATA                            0x2de
  
/* SPK2.1 SW-Errors:  */
#define STM_ERR_CARD_PUBLIC_KEY_INCOMPLETE              0x2df
#define STM_ERR_CARD_DATA_OVERFLOW                      0x2e0
#define STM_ERR_CARD_INVALID_CMD_SEQ                    0x2e1
#define STM_ERR_CARD_INVALID_SECURITY_ENV               0x2e2
#define STM_ERR_CARD_PUBLIC_KEY_NOT_CERTIFIED           0x2e3
#define STM_ERR_CARD_KEY_PART_NOT_FOUND                 0x2e4
#define STM_ERR_CARD_SIGNATURE_FAILED                   0x2e5
#define STM_ERR_CARD_INVALID_KEY_FORMAT_LIST            0x2e6
#define STM_ERR_CARD_INVALID_KEY_LENGTH                 0x2e7

/* SRF1.3 (Air 1.0) SW-Errors:  */
#define STM_ERR_CARD_FREE_ACCESS_NOT_ALLOWED            0x2e8
#define STM_ERR_CARD_OFFLINE_NOT_ALLOWED                0x2e9
#define STM_ERR_CARD_CREDIT_NOT_ALLOWED                 0x2ea
#define STM_ERR_CARD_RPA_NOT_ALLOWED                    0x2eb
#define STM_ERR_CARD_RPA_NOT_ACTIVE                     0x2ec
#define STM_ERR_CARD_T_INCONSISTENT                     0x2ed
#define STM_ERR_CARD_AUTHENTICATION_FAILED              0x2ee
#define STM_ERR_CARD_DEBIT_LIMIT_EXCEEDED               0x2ef
#define STM_ERR_CARD_OVERFLOW_UNDERFLOW                 0x2f0
#define STM_ERR_CARD_RPA_FAILED                         0x2f1
#define STM_ERR_CARD_PT_FAILED                          0x2f2

/* GSM Phase2 SW-Errors:  */
#define STM_ERR_CARD_MEMORY_PROBLEM                     0x2f3
#define STM_ERR_CARD_NO_EF_SELECTED                     0x2f4
#define STM_ERR_CARD_OUT_OF_RANGE                       0x2f5
#define STM_ERR_CARD_FILE_PATTERN_NOT_FOUND             0x2f6
#define STM_ERR_CARD_FILE_CMD_INCONSISTENT              0x2f7
#define STM_ERR_CARD_CHV_NOT_INITIALIZED                0x2f8
#define STM_ERR_CARD_COND_NOT_FULFILLED                 0x2f9
#define STM_ERR_CARD_CHV_STATUS                         0x2fa
#define STM_ERR_CARD_INVALIDATION                       0x2fb
#define STM_ERR_CARD_CHV_BLOCKED                        0x2fc
#define STM_ERR_CARD_INCREASE_OVERFLOW                  0x2fd
#define STM_ERR_CARD_NOT_LATEST_CREATED                 0x2fe
#define STM_ERR_CARD_EF_ALREADY_EXISTS                  0x2ff

/* key class specific errors */
#define STM_ERR_KEY_STATE                              0x300
#define STM_ERR_KEY_PURPOSE                            0x301   
#define STM_ERR_KEY_BAD_KEYPURPOSE                     0x302
   
/* rsakey class specific errors */
#define STM_ERR_RSAKEY_MISSING_PURPOSE                 0x310
#define STM_ERR_RSAKEY_MISSING_SIZE                    0x311
#define STM_ERR_RSAKEY_MISSING_N                       0x312
#define STM_ERR_RSAKEY_MISSING_D                       0x313
#define STM_ERR_RSAKEY_MISSING_E                       0x314
#define STM_ERR_RSAKEY_INCONS_SIZE                     0x315 
#define STM_ERR_RSAKEY_INCONS_BITDIFF                  0x316
#define STM_ERR_RSAKEY_INCONS_NPQ                      0x317
#define STM_ERR_RSAKEY_INCONS_EPQ                      0x318
#define STM_ERR_RSAKEY_INCONS_DPQ                      0x319
#define STM_ERR_RSAKEY_INCONS_ED                       0x31a
#define STM_ERR_RSAKEY_INCONS_PQ                       0x31b
#define STM_ERR_RSAKEY_CHINESE_NOT_AVAILABLE           0x31c
#define STM_ERR_RSAKEY_SOURCE01_CONVERSION_FAILED      0x31d
#define STM_ERR_RSAKEY_SOURCE02_CONVERSION_FAILED      0x31e
#define STM_ERR_RSAKEY_RESULT_CONVERSION_FAILED        0x31f
#define STM_ERR_RSAKEY_MATH_OVERFLOW                   0x320
#define STM_ERR_RSAKEY_PADDING                         0x321
#define STM_ERR_RSAKEY_N_TOO_SMALL                     0x322
#define STM_ERR_RSAKEY_P_TOO_SMALL                     0x323
#define STM_ERR_RSAKEY_Q_TOO_SMALL                     0x324
#define STM_ERR_RSAKEY_E_TOO_SMALL                     0x325
#define STM_ERR_RSAKEY_D_TOO_SMALL                     0x326
#define STM_ERR_RSAKEY_BASE_TOO_LARGE                  0x327
#define STM_ERR_RSAKEY_MESSAGE_TOO_LARGE               0x328
#define STM_ERR_RSAKEY_SIGNATURE_EMPTY                 0x329
#define STM_ERR_RSAKEY_N_EVEN                          0x32A
#define STM_ERR_RSAKEY_P_EVEN                          0x32B
#define STM_ERR_RSAKEY_Q_EVEN                          0x32C
#define STM_ERR_RSAKEY_E_EVEN                          0x32D
#define STM_ERR_RSAKEY_D_EVEN                          0x32E
#define STM_ERR_RSAKEY_NO_PRIME_FOUND                  0x32F
#define STM_ERR_RSAKEY_SIZE_TOO_SMALL                  0x330
#define STM_ERR_RSAKEY_SIZE_TOO_LARGE                  0x331
#define STM_ERR_RSAKEY_BAD_GIVEN_PRIME                 0x332
#define STM_ERR_RSAKEY_MISSING_QUALITY                 0x333
                 
/* rabinkey class specific errors */
#define STM_ERR_RABINKEY_N_CONVERSTION_FAILED          0x350
#define STM_ERR_RABINKEY_N_TOO_SMALL                   0x351
#define STM_ERR_RABINKEY_N_EVEN                        0x352
#define STM_ERR_RABINKEY_P_CONVERSTION_FAILED          0x353
#define STM_ERR_RABINKEY_P_TOO_SMALL                   0x354
#define STM_ERR_RABINKEY_P_EVEN                        0x355
#define STM_ERR_RABINKEY_Q_CONVERSTION_FAILED          0x356
#define STM_ERR_RABINKEY_Q_TOO_SMALL                   0x357
#define STM_ERR_RABINKEY_Q_EVEN                        0x358
#define STM_ERR_RABINKEY_MISSING_PURPOSE               0x359
#define STM_ERR_RABINKEY_MISSING_PQ                    0x35a
#define STM_ERR_RABINKEY_MISSING_N                     0x35b
#define STM_ERR_RABINKEY_INCONS_NPQ                    0x35c
#define STM_ERR_RABINKEY_INCONS_SIZE                   0x35d
#define STM_ERR_RABINKEY_INCONS_BITDIFF                0x35e
#define STM_ERR_RABINKEY_MATH_OVERFLOW                 0x35f
#define STM_ERR_RABINKEY_MISSING_SIZE                  0x360
#define STM_ERR_RABINKEY_SIZE_TOO_SMALL                0x361
#define STM_ERR_RABINKEY_SIZE_TOO_LARGE                0x362
#define STM_ERR_RABINKEY_BAD_GIVEN_PRIME               0x363
#define STM_ERR_RABINKEY_NO_PRIME_FOUND                0x364
#define STM_ERR_RABINKEY_MISSING_QUALITY               0x365
#define STM_ERR_RABINKEY_INCONS_PQ                     0x366

/* rabinkey class specific errors */
#define STM_ERR_MODRABINKEY_BAD_N                       0x370
#define STM_ERR_MODRABINKEY_BAD_P                       0x371
#define STM_ERR_MODRABINKEY_BAD_Q                       0x372
#define STM_ERR_MODRABINKEY_CHINESE_NOT_AVAILABLE       0x373
#define STM_ERR_MODRABINKEY_BAD_WIDTH                   0x374
#define STM_ERR_MODRABINKEY_BASE_CONVERSION_FAILED      0x375
#define STM_ERR_MODRABINKEY_BASE_TOO_LARGE              0x376
#define STM_ERR_MODRABINKEY_SIGNATURE_CONVERSION_FAILED 0x377
#define STM_ERR_MODRABINKEY_SIGNATURE_TOO_LARGE         0x378
#define STM_ERR_MODRABINKEY_RESULT_CONVERSION_FAILED    0x379
#define STM_ERR_MODRABINKEY_MATH_EXC                    0x37a
#define STM_ERR_MODRABINKEY_INCONS                      0x37b
#define STM_ERR_MODRABINKEY_BAD_BASE                    0x37c

/* deskey, des3key class specific errors */
#define STM_ERR_DESKEY_MISSING_KEY                     0x3a0
#define STM_ERR_DESKEY_BAD_KEY_LENGTH                  0x3a1
#define STM_ERR_DESKEY_BAD_PLAINTEXT_LENGTH            0x3a2
#define STM_ERR_DESKEY_BAD_CIPHERTEXT_LENGTH           0x3a3
#define STM_ERR_DESKEY_BAD_CHALLENGE_LENGTH            0x3a4

/* dsakey class specific errors */
#define STM_ERR_DSAKEY_P_CONVERSION_FAILED             0x3b0
#define STM_ERR_DSAKEY_P_EVEN                          0x3b1
#define STM_ERR_DSAKEY_BAD_P_SIZE                      0x3b2
#define STM_ERR_DSAKEY_Q_CONVERSION_FAILED             0x3b3
#define STM_ERR_DSAKEY_Q_EVEN                          0x3b4
#define STM_ERR_DSAKEY_BAD_Q_SIZE                      0x3b5
#define STM_ERR_DSAKEY_G_CONVERSION_FAILED             0x3b6
#define STM_ERR_DSAKEY_G_TOO_SMALL                     0x3b7
#define STM_ERR_DSAKEY_Y_CONVERSION_FAILED             0x3b8
#define STM_ERR_DSAKEY_Y_TOO_SMALL                     0x3b9
#define STM_ERR_DSAKEY_X_CONVERSION_FAILED             0x3ba
#define STM_ERR_DSAKEY_BAD_X                           0x3bb
#define STM_ERR_DSAKEY_NO_WITNESS                      0x3bc
#define STM_ERR_DSAKEY_MISSING_PURPOSE                 0x3bd
#define STM_ERR_DSAKEY_MISSING_PQG                     0x3be
#define STM_ERR_DSAKEY_MISSING_Y                       0x3bf
#define STM_ERR_DSAKEY_MISSING_X                       0x3c0
#define STM_ERR_DSAKEY_MISSING_SIZE                    0x3c1
#define STM_ERR_DSAKEY_INCONS_SIZE                     0x3c2
#define STM_ERR_DSAKEY_INCONS_PQ                       0x3c3
#define STM_ERR_DSAKEY_INCONS_XY                       0x3c4
#define STM_ERR_DSAKEY_INCONS_Y                        0x3c5
#define STM_ERR_DSAKEY_MATH_OVERFLOW                   0x3c6
#define STM_ERR_DSAKEY_K_CONVERSION_FAILED             0x3c7
#define STM_ERR_DSAKEY_BAD_SEED_LENGTH                 0x3c8
#define STM_ERR_DSAKEY_SEED_CONVERSION_FAILED          0x3c9
#define STM_ERR_DSAKEY_BAD_SEED                        0x3ca
#define STM_ERR_DSAKEY_MISSING_QUALITY                 0x3cb
#define STM_ERR_DSAKEY_BAD_INPUT_LENGTH                0x3cc
#define STM_ERR_DSAKEY_BAD_K                           0x3cd
#define STM_ERR_DSAKEY_BAD_SIGNATURE_LENGTH            0x3ce
#define STM_ERR_DSAKEY_BAD_R                           0x3cf
#define STM_ERR_DSAKEY_BAD_S                           0x3d0
#define STM_ERR_DSAKEY_Q_NOT_PRIME                     0x3d1

/* long class specific errors */
#define STM_ERR_LONG_TOO_LONG                 0x400    

/* process class specific errors */
#define STM_ERR_PROCESS_NOT_INITIALISED       0x500
#define STM_ERR_PROCESS_INCOMPLETE_BLOCK      0x501
#define STM_ERR_PROCESS_BAD_PAD_MODE          0x502
#define STM_ERR_PROCESS_BAD_IV_LENGTH         0x503

/* crypt process class specific errors */
#define STM_ERR_CRYPT_PROCESS_INVALID_KEY     0x510
#define STM_ERR_CRYPT_PROCESS_KEY_ERROR       0x511

/* hash derived classes */
#define STM_ERR_HASH_BAD_PREHASH_LENGTH       0x520

/* STMCByteCounter  */
#define STM_ERR_COUNTER_BAD_COUNTER_LENGTH    0x530
#define STM_ERR_COUNTER_BAD_COUNTER_VALUE     0x531

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -