blowfish_test.cpp File Reference

#include <basis/byte_array.h>
#include <basis/chaos.h>
#include <basis/function.h>
#include <basis/istring.h>
#include <mechanisms/time_stamp.h>
#include <data_struct/static_memory_gremlin.h>
#include <textual/string_manipulation.h>
#include <openssl/blowfish.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <stdio.h>
#include <string.h>

Include dependency graph for blowfish_test.cpp:

Go to the source code of this file.

Defines

#define static_class_name()   "blowfish_test"

Functions

void provide_init_vect (byte_array &new_iv)
void generate_key (int size, byte_array &new_key)
const byte_arrayrandom_seed ()
bool blowfish_encryption (const byte_array &key, const byte_array &init_vect, const byte_array &source, byte_array &target)
bool blowfish_decryption (const byte_array &key, const byte_array &init_vect, const byte_array &source, byte_array &target)
int main (int formal(argc), char *formal(argv)[])

Variables

 HOOPLE_STARTUP_CODE
const int KEY_SIZE = 402
const int TEST_RUNS = 100
const int SEED_SIZE = 100
const int MAX_STRING = 1000000
const int MAX_CHUNK = 1024
chaos rando


Define Documentation

 
#define static_class_name (  )     "blowfish_test"

Definition at line 55 of file blowfish_test.cpp.


Function Documentation

bool blowfish_decryption ( const byte_array key,
const byte_array init_vect,
const byte_array source,
byte_array target 
)

Definition at line 136 of file blowfish_test.cpp.

References continuable_error, FUNCDEF, array< contents >::last(), array< contents >::length(), MAX_CHUNK, array< contents >::observe(), array< contents >::reset(), and static_class_name.

Referenced by main().

bool blowfish_encryption ( const byte_array key,
const byte_array init_vect,
const byte_array source,
byte_array target 
)

Definition at line 84 of file blowfish_test.cpp.

References continuable_error, FUNCDEF, array< contents >::last(), array< contents >::length(), MAX_CHUNK, array< contents >::observe(), array< contents >::reset(), and static_class_name.

Referenced by main().

void generate_key ( int  size,
byte_array new_key 
)

Definition at line 63 of file blowfish_test.cpp.

References chaos::inclusive(), rando, and array< contents >::reset().

Referenced by main().

int main ( int   formal(argc),
char *  formal(argv)[] 
)

Definition at line 186 of file blowfish_test.cpp.

References blowfish_decryption(), blowfish_encryption(), deadly_error, flip_increasing(), FUNCDEF, generate_key(), chaos::inclusive(), KEY_SIZE, istring::length(), string_manipulation::make_random_name(), MAX_STRING, array< contents >::observe(), provide_init_vect(), rando, random_seed(), time_stamp::reset(), istring::s(), SEED_SIZE, static_class_name, istring::substring(), TEST_RUNS, and time_stamp::value().

void provide_init_vect ( byte_array new_iv  ) 

Definition at line 57 of file blowfish_test.cpp.

References array< contents >::reset().

Referenced by main().

const byte_array& random_seed (  ) 

Definition at line 69 of file blowfish_test.cpp.

References chaos::inclusive(), rando, and SEED_SIZE.

Referenced by main().


Variable Documentation

HOOPLE_STARTUP_CODE

Definition at line 36 of file blowfish_test.cpp.

const int KEY_SIZE = 402

Definition at line 38 of file blowfish_test.cpp.

const int MAX_CHUNK = 1024

Definition at line 50 of file blowfish_test.cpp.

const int MAX_STRING = 1000000

Definition at line 47 of file blowfish_test.cpp.

chaos rando

Definition at line 53 of file blowfish_test.cpp.

const int SEED_SIZE = 100

Definition at line 44 of file blowfish_test.cpp.

const int TEST_RUNS = 100

Definition at line 41 of file blowfish_test.cpp.

Referenced by main().


Generated on Fri Nov 28 04:30:32 2008 for HOOPLE Libraries by  doxygen 1.5.1