feisty meow concerns codebase 2.140
blowfish_crypto.cpp File Reference
#include "blowfish_crypto.h"
#include "ssl_init.h"
#include <basis/astring.h>
#include <basis/functions.h>
#include <basis/mutex.h>
#include <loggers/critical_events.h>
#include <loggers/program_wide_logger.h>
#include <mathematics/chaos.h>
#include <structures/static_memory_gremlin.h>
#include <openssl/blowfish.h>
#include <openssl/err.h>
#include <openssl/evp.h>
Include dependency graph for blowfish_crypto.cpp:

Go to the source code of this file.

Namespaces

namespace  crypto
 

Macros

#define DEBUG_BLOWFISH
 
#define ALWAYS_LOG(t)   CLASS_EMERGENCY_LOG(program_wide_logger::get(), t)
 
#define LOG(t)   CLASS_EMERGENCY_LOG(program_wide_logger::get(), t)
 
#define GET_SSL_ERROR()    ERR_error_string(ERR_get_error(), NULL_POINTER)
 
#define DISCUSS_KEY_SIZE(key_size)
 
#define DISCUSS_PROVIDED_KEY(key_size, key)
 

Variables

const int crypto::FUDGE = 128
 

Macro Definition Documentation

◆ ALWAYS_LOG

#define ALWAYS_LOG (   t)    CLASS_EMERGENCY_LOG(program_wide_logger::get(), t)

Definition at line 49 of file blowfish_crypto.cpp.

◆ DEBUG_BLOWFISH

#define DEBUG_BLOWFISH

Definition at line 45 of file blowfish_crypto.cpp.

◆ DISCUSS_KEY_SIZE

#define DISCUSS_KEY_SIZE (   key_size)
Value:
if (key_size < minimum_key_size()) { \
deadly_error(static_class_name(), func, \
a_sprintf("key size (%d bits) is less than minimum key size %d.", \
key_size, minimum_key_size())); \
} \
if (key_size > maximum_key_size()) { \
deadly_error(static_class_name(), func, \
a_sprintf("key size (%d bits) is greater than maximum key size %d.", \
key_size, maximum_key_size())); \
}
a_sprintf is a specialization of astring that provides printf style support.
Definition astring.h:440
#define static_class_name()

Definition at line 64 of file blowfish_crypto.cpp.

◆ DISCUSS_PROVIDED_KEY

#define DISCUSS_PROVIDED_KEY (   key_size,
  key 
)
Value:
if (key.length() * BITS_PER_BYTE < key_size) { \
deadly_error(static_class_name(), func, \
a_sprintf("key array length (%d) is less than required by key size " \
"(%d bits).", key.length(), key_size)); \
}
#define BITS_PER_BYTE
A fundamental constant measuring the number of bits in a byte.
Definition definitions.h:38

Definition at line 78 of file blowfish_crypto.cpp.

◆ GET_SSL_ERROR

#define GET_SSL_ERROR ( )     ERR_error_string(ERR_get_error(), NULL_POINTER)

Definition at line 59 of file blowfish_crypto.cpp.

◆ LOG

#define LOG (   t)    CLASS_EMERGENCY_LOG(program_wide_logger::get(), t)

Definition at line 52 of file blowfish_crypto.cpp.