Go to the documentation of this file.
31 #ifndef _PKCS5_COMMON_H
32 #define _PKCS5_COMMON_H
38 #ifndef PKCS5_RC2_SUPPORT
39 #define PKCS5_RC2_SUPPORT DISABLED
40 #elif (PKCS5_RC2_SUPPORT != ENABLED && PKCS5_RC2_SUPPORT != DISABLED)
41 #error PKCS5_RC2_SUPPORT parameter is not valid
45 #ifndef PKCS5_DES_SUPPORT
46 #define PKCS5_DES_SUPPORT DISABLED
47 #elif (PKCS5_DES_SUPPORT != ENABLED && PKCS5_DES_SUPPORT != DISABLED)
48 #error PKCS5_DES_SUPPORT parameter is not valid
52 #ifndef PKCS5_3DES_SUPPORT
53 #define PKCS5_3DES_SUPPORT DISABLED
54 #elif (PKCS5_3DES_SUPPORT != ENABLED && PKCS5_3DES_SUPPORT != DISABLED)
55 #error PKCS5_3DES_SUPPORT parameter is not valid
59 #ifndef PKCS5_AES_SUPPORT
60 #define PKCS5_AES_SUPPORT ENABLED
61 #elif (PKCS5_AES_SUPPORT != ENABLED && PKCS5_AES_SUPPORT != DISABLED)
62 #error PKCS5_AES_SUPPORT parameter is not valid
66 #ifndef PKCS5_CAMELLIA_SUPPORT
67 #define PKCS5_CAMELLIA_SUPPORT DISABLED
68 #elif (PKCS5_CAMELLIA_SUPPORT != ENABLED && PKCS5_CAMELLIA_SUPPORT != DISABLED)
69 #error PKCS5_CAMELLIA_SUPPORT parameter is not valid
73 #ifndef PKCS5_ARIA_SUPPORT
74 #define PKCS5_ARIA_SUPPORT DISABLED
75 #elif (PKCS5_ARIA_SUPPORT != ENABLED && PKCS5_ARIA_SUPPORT != DISABLED)
76 #error PKCS5_ARIA_SUPPORT parameter is not valid
80 #ifndef PKCS5_SM4_SUPPORT
81 #define PKCS5_SM4_SUPPORT DISABLED
82 #elif (PKCS5_SM4_SUPPORT != ENABLED && PKCS5_SM4_SUPPORT != DISABLED)
83 #error PKCS5_SM4_SUPPORT parameter is not valid
87 #ifndef PKCS5_MD2_SUPPORT
88 #define PKCS5_MD2_SUPPORT DISABLED
89 #elif (PKCS5_MD2_SUPPORT != ENABLED && PKCS5_MD2_SUPPORT != DISABLED)
90 #error PKCS5_MD2_SUPPORT parameter is not valid
94 #ifndef PKCS5_MD5_SUPPORT
95 #define PKCS5_MD5_SUPPORT DISABLED
96 #elif (PKCS5_MD5_SUPPORT != ENABLED && PKCS5_MD5_SUPPORT != DISABLED)
97 #error PKCS5_MD5_SUPPORT parameter is not valid
101 #ifndef PKCS5_SHA1_SUPPORT
102 #define PKCS5_SHA1_SUPPORT DISABLED
103 #elif (PKCS5_SHA1_SUPPORT != ENABLED && PKCS5_SHA1_SUPPORT != DISABLED)
104 #error PKCS5_SHA1_SUPPORT parameter is not valid
108 #ifndef PKCS5_SHA224_SUPPORT
109 #define PKCS5_SHA224_SUPPORT DISABLED
110 #elif (PKCS5_SHA224_SUPPORT != ENABLED && PKCS5_SHA224_SUPPORT != DISABLED)
111 #error PKCS5_SHA224_SUPPORT parameter is not valid
115 #ifndef PKCS5_SHA256_SUPPORT
116 #define PKCS5_SHA256_SUPPORT ENABLED
117 #elif (PKCS5_SHA256_SUPPORT != ENABLED && PKCS5_SHA256_SUPPORT != DISABLED)
118 #error PKCS5_SHA256_SUPPORT parameter is not valid
122 #ifndef PKCS5_SHA384_SUPPORT
123 #define PKCS5_SHA384_SUPPORT ENABLED
124 #elif (PKCS5_SHA384_SUPPORT != ENABLED && PKCS5_SHA384_SUPPORT != DISABLED)
125 #error PKCS5_SHA384_SUPPORT parameter is not valid
129 #ifndef PKCS5_SHA512_SUPPORT
130 #define PKCS5_SHA512_SUPPORT ENABLED
131 #elif (PKCS5_SHA512_SUPPORT != ENABLED && PKCS5_SHA512_SUPPORT != DISABLED)
132 #error PKCS5_SHA512_SUPPORT parameter is not valid
136 #ifndef PKCS5_SHA512_224_SUPPORT
137 #define PKCS5_SHA512_224_SUPPORT DISABLED
138 #elif (PKCS5_SHA512_224_SUPPORT != ENABLED && PKCS5_SHA512_224_SUPPORT != DISABLED)
139 #error PKCS5_SHA512_224_SUPPORT parameter is not valid
143 #ifndef PKCS5_SHA512_256_SUPPORT
144 #define PKCS5_SHA512_256_SUPPORT DISABLED
145 #elif (PKCS5_SHA512_256_SUPPORT != ENABLED && PKCS5_SHA512_256_SUPPORT != DISABLED)
146 #error PKCS5_SHA512_256_SUPPORT parameter is not valid
150 #ifndef PKCS5_SM3_SUPPORT
151 #define PKCS5_SM3_SUPPORT DISABLED
152 #elif (PKCS5_SM3_SUPPORT != ENABLED && PKCS5_SM3_SUPPORT != DISABLED)
153 #error PKCS5_SM3_SUPPORT parameter is not valid
const HashAlgo * pkcs5GetPbes2HashAlgo(const uint8_t *oid, size_t length)
Get the hash algorithm to be used for PBES2 operation.
uint_t pkcs5GetPbes2KeyLength(const uint8_t *oid, size_t length)
Get the encryption key length to be used for PBES2 operation.
const uint8_t PBE_WITH_SHA1_AND_RC2_CBC_OID[9]
const uint8_t PBE_WITH_MD2_AND_DES_CBC_OID[9]
const uint8_t PBE_WITH_MD5_AND_RC2_CBC_OID[9]
const uint8_t PBE_WITH_MD2_AND_RC2_CBC_OID[9]
Pkcs5OctetString kdfAlgoId
const HashAlgo * pkcs5GetPbes1HashAlgo(const uint8_t *oid, size_t length)
Get the hash algorithm to be used for PBES1 operation.
const CipherAlgo * pkcs5GetPbes1CipherAlgo(const uint8_t *oid, size_t length)
Get the cipher algorithm to be used for PBES1 operation.
Pkcs5EncryptionScheme encryptionScheme
Pkcs5OctetString prfAlgoId
General definitions for cryptographic algorithms.
const uint8_t PBE_WITH_MD5_AND_DES_CBC_OID[9]
Common interface for encryption algorithms.
const CipherAlgo * pkcs5GetPbes2CipherAlgo(const uint8_t *oid, size_t length)
Get the cipher algorithm to be used for PBES2 operation.
Common interface for hash algorithms.
const uint8_t PBE_WITH_SHA1_AND_DES_CBC_OID[9]
const uint8_t PBES2_OID[9]
Pkcs5KeyDerivationFunc keyDerivationFunc