feisty meow concerns codebase 2.140
cryptical_envelopment.cpp File Reference
#include "cryptical_envelopment.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/err.h>
#include <openssl/evp.h>
Include dependency graph for cryptical_envelopment.cpp:

Go to the source code of this file.

Namespaces

namespace  crypto
 

Macros

#define ALWAYS_LOG(t)   CLASS_EMERGENCY_LOG(program_wide_logger::get(), t)
 
#define LOG(t)
 
#define GET_SSL_ERROR()    ERR_error_string(ERR_get_error(), NULL_POINTER)
 
#define ERROR_BAILOUT(a, b, c)   continuable_error(a, b, c)
 
#define DISCUSS_KEY_SIZE(key_size)
 
#define DISCUSS_PROVIDED_KEY(key_size, key)
 
#define BYTE_TO_BINARY_PATTERN   "%c%c%c%c%c%c%c%c"
 
#define BYTE_TO_BINARY(byte)
 

Variables

const int crypto::FUDGE = 1024
 

Macro Definition Documentation

◆ ALWAYS_LOG

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

Definition at line 52 of file cryptical_envelopment.cpp.

◆ BYTE_TO_BINARY

#define BYTE_TO_BINARY (   byte)
Value:
((byte) & 0x80 ? '1' : '0'), \
((byte) & 0x40 ? '1' : '0'), \
((byte) & 0x20 ? '1' : '0'), \
((byte) & 0x10 ? '1' : '0'), \
((byte) & 0x08 ? '1' : '0'), \
((byte) & 0x04 ? '1' : '0'), \
((byte) & 0x02 ? '1' : '0'), \
((byte) & 0x01 ? '1' : '0')

Definition at line 160 of file cryptical_envelopment.cpp.

◆ BYTE_TO_BINARY_PATTERN

#define BYTE_TO_BINARY_PATTERN   "%c%c%c%c%c%c%c%c"

Definition at line 159 of file cryptical_envelopment.cpp.

◆ DISCUSS_KEY_SIZE

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

Definition at line 73 of file cryptical_envelopment.cpp.

◆ DISCUSS_PROVIDED_KEY

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

Definition at line 89 of file cryptical_envelopment.cpp.

◆ ERROR_BAILOUT

#define ERROR_BAILOUT (   a,
  b,
  c 
)    continuable_error(a, b, c)

Definition at line 69 of file cryptical_envelopment.cpp.

◆ GET_SSL_ERROR

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

Definition at line 62 of file cryptical_envelopment.cpp.

◆ LOG

#define LOG (   t)

Definition at line 58 of file cryptical_envelopment.cpp.