made using key in encrypter smarter
This commit is contained in:
parent
201211010a
commit
e2982471f4
@ -49,7 +49,7 @@ outputFlags encryptText(char *text, char *keyNew)
|
||||
}
|
||||
|
||||
//VARIABLES
|
||||
char *key = malloc(getKeyLength() + 1);
|
||||
char *key = NULL;
|
||||
char *returningText;
|
||||
char *textBuffer = malloc(1);
|
||||
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
||||
@ -63,12 +63,14 @@ outputFlags encryptText(char *text, char *keyNew)
|
||||
return noOutput(checkExitCode);
|
||||
}
|
||||
|
||||
strcpy(key, keyNew);
|
||||
key = strdup(keyNew);
|
||||
|
||||
//REDEFINE keyLength
|
||||
setKeyLength(strlen(key));
|
||||
} else //LOAD KEY
|
||||
{
|
||||
key = malloc(getKeyLength() + 1);
|
||||
|
||||
generateKey(key, getKeyLength());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user