Implementaion Manual


BACK | INDEX | NEXT

Text Editor


Key_table Initializes key table and inserts characters into the correct position.
Key_table()

Sets all elements of the table array to the null character.
insert(char replace_char, char std_char)

Inserts replaced character into index'th index.
insert(char insert_char, char std_char)

Inserts insert_char into index'th index.
print()

Prints Key_table.

DecryptData Responsible for holding data for individual characters in the decryption window.


Cypher_text_editor Text editor for Cypher program
Cypher_text_editor(char * data_ptr) constructor

Changes every old_char into a new_char and returns the number of characters that have been changed from old to new, and stores their positions in int_array.
~Cypher_text_editor() destructor

Destroys object of type Cypher text editor ... Pointers deallocated, memory freed.
init( char * data_ptr, int str_size ) return void

reinit( char * cipher, char* plain, int str_size ) return void

restat( bool ig_nonalpha ) return void

change_text(char new_char, char old_char, bool use_wrap, bool swap) returns bool

Data_object.value_array is updated to contain new information.
clear_key( int key_number ) return void

Clears the key and erases locked status.
add_space(int index) return bool

Space addition function. Returns true if successful
delete_space(int index) return bool

Space deletion function. Returns true if successful.
operator []( int index ) returns char

Returns the value of decrypted data at given index location.
operator ()( int index ) returns char

Returns the encrypted data at given location.
return_flag ( int index ) returns int

Returns the flag status of the element at index.
return_key_entry( int index ) returns char

Returns key entry of given index.
locked_status( int index ) returns bool

Returns the locked status of the element in index.
word_wrap( bool is_wrapped, int table_num ) returns bool

Sets decryption data according to word wrap being on or off.
change_lock( char character, bool update_table, int table_num ) return void

Swaps the locked value in the given array, also updates output.
clear_highlight() return void

Clears highlight flag from flag_array.
run_analysis( int type, bool alphasort ) return void

Runs statistical data to get frequency analysis of the cipher text.
sort_eng_data( int type, bool alphasort ) return void

get_analysis( int type, int index )

Returns type frequency analysis data at given index.
get_analysis_size( int type ) return int

Returns stat analysis size
get_eng_data( int type, int index )

Returns english frequency analysis data at given index.
update_v_space( int space ) return void

load_v_key( int spacing, int table_num ) return void

return_shifted ( int key_num ) return int

swap_keys( int key_num, bool undo ) return void

shift_data ( int shift_amount, int space_between = 1, int use_index = 0, int low_bound = ASCII_OFFSET, int up_bound = TABLE_SIZE + ASCII_OFFSET ) return int

Shifts data specified amount.
convert_char( char check_char, char & return_char ) return bool

dict_lookup() return void

Parses through encrypt_data and iteratively searches words or sections of text for the largest dictionary match or partial match, which is then highlighted.
Print() return void

Print to screen.