Botan: src/utils/assert.h File Reference

Botan 1.10.16

Namespaces | Macros | Functions
assert.h File Reference

Go to the source code of this file.

## Namespaces
| Botan

## Macros
#define | BOTAN_ASSERT(expr, msg)
#define | BOTAN_ASSERT_EQUAL(value1, value2, msg)
#define | BOTAN_ASSERT_FUNCTION ((const char*)0)

## Functions
void | Botan::assertion_failure (const char *expr_str, const char *msg, const char *func, const char *file, int line)

## Macro Definition Documentation

## ◆ BOTAN_ASSERT

#define BOTAN_ASSERT | ( |  | expr,
|  |  | msg
| ) |  |

Value:
do { \
if(!(expr)) \
Botan::assertion_failure(#expr, \
msg, \
BOTAN_ASSERT_FUNCTION, \
__FILE__, \
__LINE__); \
} while(0)
BOTAN_ASSERT_FUNCTION
#define BOTAN_ASSERT_FUNCTION
Definition: assert.h:54
Botan::assertion_failure
void assertion_failure(const char *expr_str, const char *msg, const char *func, const char *file, int line)
Definition: assert.cpp:14

Definition at line 19 of file assert.h.

Referenced by Botan::Output_Buffers::add(), Botan::ECDH_KA_Operation::agree(), Botan::bigint_mul(), Botan::bigint_sqr(), Botan::RSA_Private_Operation::decrypt(), Botan::EC_PrivateKey::EC_PrivateKey(), Botan::DL_Group::PEM_decode(), Botan::PointGFp::PointGFp(), and Botan::Output_Buffers::retire().

## ◆ BOTAN_ASSERT_EQUAL

#define BOTAN_ASSERT_EQUAL | ( |  | value1,
|  |  | value2,
|  |  | msg
| ) |  |

Value:
do { \
if(value1 != value2) \
Botan::assertion_failure(#value1 " == " #value2, \
msg, \
BOTAN_ASSERT_FUNCTION, \
__FILE__, \
__LINE__); \
} while(0)
BOTAN_ASSERT_FUNCTION
#define BOTAN_ASSERT_FUNCTION
Definition: assert.h:54
Botan::assertion_failure
void assertion_failure(const char *expr_str, const char *msg, const char *func, const char *file, int line)
Definition: assert.cpp:14

Definition at line 29 of file assert.h.

Referenced by Botan::base64_encode(), and Botan::PKCS7_Padding::pad().

## ◆ BOTAN_ASSERT_FUNCTION

#define BOTAN_ASSERT_FUNCTION ((const char*)0)

Definition at line 54 of file assert.h.