Add conditional compilation to resolve the compilation error (error: unknown type name)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12087 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
474bc51a14
commit
d96d3fbf32
|
@ -341,6 +341,7 @@ extern "C" {
|
|||
size_t size, const uint8_t *in);
|
||||
cryerror_t crySHA512Final(CRYDriver *cryp, SHA512Context *sha512ctxp,
|
||||
uint8_t *out);
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA256 == TRUE) || defined(__DOXYGEN__)
|
||||
cryerror_t cryHMACSHA256Init(CRYDriver *cryp,
|
||||
HMACSHA256Context *hmacsha256ctxp);
|
||||
cryerror_t cryHMACSHA256Update(CRYDriver *cryp,
|
||||
|
@ -350,6 +351,8 @@ extern "C" {
|
|||
cryerror_t cryHMACSHA256Final(CRYDriver *cryp,
|
||||
HMACSHA256Context *hmacsha256ctxp,
|
||||
uint8_t *out);
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA256 */
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA512 == TRUE) || defined(__DOXYGEN__)
|
||||
cryerror_t cryHMACSHA512Init(CRYDriver *cryp,
|
||||
HMACSHA512Context *hmacsha512ctxp);
|
||||
cryerror_t cryHMACSHA512Update(CRYDriver *cryp,
|
||||
|
@ -359,6 +362,7 @@ extern "C" {
|
|||
cryerror_t cryHMACSHA512Final(CRYDriver *cryp,
|
||||
HMACSHA512Context *hmacsha512ctxp,
|
||||
uint8_t *out);
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA512 */
|
||||
cryerror_t cryTRNG(CRYDriver *cryp, uint8_t *out);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1063,6 +1063,7 @@ cryerror_t cry_lld_SHA512_final(CRYDriver *cryp, SHA512Context *sha512ctxp,
|
|||
return CRY_ERR_INV_ALGO;
|
||||
}
|
||||
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA256 == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Hash initialization using HMAC_SHA256.
|
||||
* @note Use of this algorithm is not recommended because proven weak.
|
||||
|
@ -1138,7 +1139,9 @@ cryerror_t cry_lld_HMACSHA256_final(CRYDriver *cryp,
|
|||
|
||||
return CRY_ERR_INV_ALGO;
|
||||
}
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA256 */
|
||||
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA512 == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Hash initialization using HMAC_SHA512.
|
||||
* @note Use of this algorithm is not recommended because proven weak.
|
||||
|
@ -1214,6 +1217,7 @@ cryerror_t cry_lld_HMACSHA512_final(CRYDriver *cryp,
|
|||
|
||||
return CRY_ERR_INV_ALGO;
|
||||
}
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA512 */
|
||||
|
||||
/**
|
||||
* @brief True random numbers generator.
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#define CRY_LLD_SUPPORTS_AES TRUE
|
||||
#define CRY_LLD_SUPPORTS_AES_ECB TRUE
|
||||
#define CRY_LLD_SUPPORTS_AES_CBC TRUE
|
||||
#define CRY_LLD_SUPPORTS_AES_CFB FALSE
|
||||
#define CRY_LLD_SUPPORTS_AES_CFB TRUE
|
||||
#define CRY_LLD_SUPPORTS_AES_CTR TRUE
|
||||
#define CRY_LLD_SUPPORTS_AES_GCM TRUE
|
||||
#define CRY_LLD_SUPPORTS_DES TRUE
|
||||
|
@ -297,21 +297,28 @@ extern "C" {
|
|||
const uint8_t *in,
|
||||
uint8_t *out,
|
||||
const uint8_t *iv);
|
||||
#if (CRY_LLD_SUPPORTS_SHA1 == TRUE) || defined(__DOXYGEN__)
|
||||
cryerror_t cry_lld_SHA1_init(CRYDriver *cryp, SHA1Context *sha1ctxp);
|
||||
cryerror_t cry_lld_SHA1_update(CRYDriver *cryp, SHA1Context *sha1ctxp,
|
||||
size_t size, const uint8_t *in);
|
||||
cryerror_t cry_lld_SHA1_final(CRYDriver *cryp, SHA1Context *sha1ctxp,
|
||||
uint8_t *out);
|
||||
#endif /* CRY_LLD_SUPPORTS_SHA1 */
|
||||
#if (CRY_LLD_SUPPORTS_SHA256 == TRUE) || defined(__DOXYGEN__)
|
||||
cryerror_t cry_lld_SHA256_init(CRYDriver *cryp, SHA256Context *sha256ctxp);
|
||||
cryerror_t cry_lld_SHA256_update(CRYDriver *cryp, SHA256Context *sha256ctxp,
|
||||
size_t size, const uint8_t *in);
|
||||
cryerror_t cry_lld_SHA256_final(CRYDriver *cryp, SHA256Context *sha256ctxp,
|
||||
uint8_t *out);
|
||||
#endif /* CRY_LLD_SUPPORTS_SHA256 */
|
||||
#if (CRY_LLD_SUPPORTS_SHA512 == TRUE) || defined(__DOXYGEN__)
|
||||
cryerror_t cry_lld_SHA512_init(CRYDriver *cryp, SHA512Context *sha512ctxp);
|
||||
cryerror_t cry_lld_SHA512_update(CRYDriver *cryp, SHA512Context *sha512ctxp,
|
||||
size_t size, const uint8_t *in);
|
||||
cryerror_t cry_lld_SHA512_final(CRYDriver *cryp, SHA512Context *sha512ctxp,
|
||||
uint8_t *out);
|
||||
#endif /* CRY_LLD_SUPPORTS_SHA512 */
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA256 == TRUE) || defined(__DOXYGEN__)
|
||||
cryerror_t cry_lld_HMACSHA256_init(CRYDriver *cryp,
|
||||
HMACSHA256Context *hmacsha256ctxp);
|
||||
cryerror_t cry_lld_HMACSHA256_update(CRYDriver *cryp,
|
||||
|
@ -320,6 +327,8 @@ extern "C" {
|
|||
cryerror_t cry_lld_HMACSHA256_final(CRYDriver *cryp,
|
||||
HMACSHA256Context *hmacsha256ctxp,
|
||||
uint8_t *out);
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA256 */
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA512 == TRUE) || defined(__DOXYGEN__)
|
||||
cryerror_t cry_lld_HMACSHA512_init(CRYDriver *cryp,
|
||||
HMACSHA512Context *hmacsha512ctxp);
|
||||
cryerror_t cry_lld_HMACSHA512_update(CRYDriver *cryp,
|
||||
|
@ -328,6 +337,7 @@ extern "C" {
|
|||
cryerror_t cry_lld_HMACSHA512_final(CRYDriver *cryp,
|
||||
HMACSHA512Context *hmacsha512ctxp,
|
||||
uint8_t *out);
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA512 */
|
||||
cryerror_t cry_lld_TRNG(CRYDriver *cryp, uint8_t *out);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1418,6 +1418,7 @@ cryerror_t crySHA512Final(CRYDriver *cryp, SHA512Context *sha512ctxp,
|
|||
#endif
|
||||
}
|
||||
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA256 == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Hash initialization using HMAC_SHA256.
|
||||
* @note Use of this algorithm is not recommended because proven weak.
|
||||
|
@ -1523,7 +1524,9 @@ cryerror_t cryHMACSHA256Final(CRYDriver *cryp,
|
|||
return CRY_ERR_INV_ALGO;
|
||||
#endif
|
||||
}
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA256 */
|
||||
|
||||
#if (CRY_LLD_SUPPORTS_HMAC_SHA256 == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Hash initialization using HMAC_SHA512.
|
||||
* @note Use of this algorithm is not recommended because proven weak.
|
||||
|
@ -1629,6 +1632,7 @@ cryerror_t cryHMACSHA512Final(CRYDriver *cryp,
|
|||
return CRY_ERR_INV_ALGO;
|
||||
#endif
|
||||
}
|
||||
#endif /* CRY_LLD_SUPPORTS_HMAC_SHA256 */
|
||||
|
||||
/**
|
||||
* @brief True random numbers generator.
|
||||
|
|
Loading…
Reference in New Issue