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_MD2_SUPPORT
67 #define PKCS5_MD2_SUPPORT DISABLED
68 #elif (PKCS5_MD2_SUPPORT != ENABLED && PKCS5_MD2_SUPPORT != DISABLED)
69 #error PKCS5_MD2_SUPPORT parameter is not valid
73 #ifndef PKCS5_MD5_SUPPORT
74 #define PKCS5_MD5_SUPPORT DISABLED
75 #elif (PKCS5_MD5_SUPPORT != ENABLED && PKCS5_MD5_SUPPORT != DISABLED)
76 #error PKCS5_MD5_SUPPORT parameter is not valid
80 #ifndef PKCS5_SHA1_SUPPORT
81 #define PKCS5_SHA1_SUPPORT DISABLED
82 #elif (PKCS5_SHA1_SUPPORT != ENABLED && PKCS5_SHA1_SUPPORT != DISABLED)
83 #error PKCS5_SHA1_SUPPORT parameter is not valid
87 #ifndef PKCS5_SHA224_SUPPORT
88 #define PKCS5_SHA224_SUPPORT DISABLED
89 #elif (PKCS5_SHA224_SUPPORT != ENABLED && PKCS5_SHA224_SUPPORT != DISABLED)
90 #error PKCS5_SHA224_SUPPORT parameter is not valid
94 #ifndef PKCS5_SHA256_SUPPORT
95 #define PKCS5_SHA256_SUPPORT ENABLED
96 #elif (PKCS5_SHA256_SUPPORT != ENABLED && PKCS5_SHA256_SUPPORT != DISABLED)
97 #error PKCS5_SHA256_SUPPORT parameter is not valid
101 #ifndef PKCS5_SHA384_SUPPORT
102 #define PKCS5_SHA384_SUPPORT ENABLED
103 #elif (PKCS5_SHA384_SUPPORT != ENABLED && PKCS5_SHA384_SUPPORT != DISABLED)
104 #error PKCS5_SHA384_SUPPORT parameter is not valid
108 #ifndef PKCS5_SHA512_SUPPORT
109 #define PKCS5_SHA512_SUPPORT ENABLED
110 #elif (PKCS5_SHA512_SUPPORT != ENABLED && PKCS5_SHA512_SUPPORT != DISABLED)
111 #error PKCS5_SHA512_SUPPORT parameter is not valid
115 #ifndef PKCS5_SHA512_224_SUPPORT
116 #define PKCS5_SHA512_224_SUPPORT DISABLED
117 #elif (PKCS5_SHA512_224_SUPPORT != ENABLED && PKCS5_SHA512_224_SUPPORT != DISABLED)
118 #error PKCS5_SHA512_224_SUPPORT parameter is not valid
122 #ifndef PKCS5_SHA512_256_SUPPORT
123 #define PKCS5_SHA512_256_SUPPORT DISABLED
124 #elif (PKCS5_SHA512_256_SUPPORT != ENABLED && PKCS5_SHA512_256_SUPPORT != DISABLED)
125 #error PKCS5_SHA512_256_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 * kdfAlgoId
const uint8_t PBE_WITH_MD5_AND_RC2_CBC_OID[9]
const uint8_t PBE_WITH_MD2_AND_RC2_CBC_OID[9]
const uint8_t AES128_CBC_PAD_OID[9]
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.
const uint8_t DES_CBC_PAD_OID[5]
Pkcs5EncryptionScheme encryptionScheme
const uint8_t DES_EDE3_CBC_PAD_OID[8]
General definitions for cryptographic algorithms.
const uint8_t PBE_WITH_MD5_AND_DES_CBC_OID[9]
const uint8_t AES192_CBC_PAD_OID[9]
const uint8_t * prfAlgoId
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 AES256_CBC_PAD_OID[9]
const uint8_t PBE_WITH_SHA1_AND_DES_CBC_OID[9]
const uint8_t PBES2_OID[9]
Pkcs5KeyDerivationFunc keyDerivationFunc