diff --git a/include/misc.h b/include/misc.h
index 26c1ffb..5297670 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -24,7 +24,7 @@ along with this program. If not, see .
#include
void why2_generate_text_key_chain(char *key, int *textKeyChain, int textKeyChainSize); //GENERATES ARRAY FOR ENCRYPTION/DECRYPTION
-void why2_generate_key(char *key, int keyLength); //GENERATE ENCRYPTION KEY
+enum WHY2_EXIT_CODES why2_generate_key(char *key, int keyLength); //GENERATE ENCRYPTION KEY
void why2_deallocate_output(why2_output_flags flags); //DEALLOCATES flags
enum WHY2_EXIT_CODES why2_check_version(void); //THIS FUNCTION CHECKS IF LATEST WHY2_VERSION OF WHY2 IS USED
enum WHY2_EXIT_CODES why2_check_key(char *key); //CHECKS IF KEY IS VALID
diff --git a/src/core/lib/utils/misc.c b/src/core/lib/utils/misc.c
index 5c497cf..70625c9 100644
--- a/src/core/lib/utils/misc.c
+++ b/src/core/lib/utils/misc.c
@@ -411,7 +411,7 @@ unsigned long why2_compare_time_micro(struct timeval startTime, struct timeval f
return (finishTime.tv_sec - startTime.tv_sec) * 1000000 + finishTime.tv_usec - startTime.tv_usec;
}
-void why2_generate_key(char *key, int keyLength)
+enum WHY2_EXIT_CODES why2_generate_key(char *key, int keyLength)
{
int numberBuffer;