implemented WHY2_OUTPUT_TEXT in encrypter
This commit is contained in:
parent
782e964fa2
commit
773591d452
@ -52,7 +52,7 @@ why2_output_flags why2_encrypt_text(char *text, char *key_new)
|
||||
|
||||
//VARIABLES
|
||||
char *key = NULL;
|
||||
char *returning_text;
|
||||
char *returning_text = NULL;
|
||||
char *text_buffer = NULL;
|
||||
int *text_key_chain = why2_malloc(sizeof(int) * strlen(text));
|
||||
int number_buffer = 0;
|
||||
@ -84,6 +84,8 @@ why2_output_flags why2_encrypt_text(char *text, char *key_new)
|
||||
text_key_chain[i] = why2_get_encryption_operation()(text_key_chain[i], (int) text[i]);
|
||||
}
|
||||
|
||||
if (why2_get_flags().format == WHY2_OUTPUT_TEXT) //NORMAL 420.-69 FORMAT
|
||||
{
|
||||
//COUNT REQUIRED SIZE FOR returning_text
|
||||
for (int i = 0; i < (int) strlen(text); i++)
|
||||
{
|
||||
@ -109,6 +111,7 @@ why2_output_flags why2_encrypt_text(char *text, char *key_new)
|
||||
returning_text[strlen(returning_text)] = why2_get_encryption_separator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//GET FINISH TIME
|
||||
gettimeofday(&finish_time, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user