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
|
//VARIABLES
|
||||||
char *key = malloc(getKeyLength() + 1);
|
char *key = NULL;
|
||||||
char *returningText;
|
char *returningText;
|
||||||
char *textBuffer = malloc(1);
|
char *textBuffer = malloc(1);
|
||||||
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
||||||
@ -63,12 +63,14 @@ outputFlags encryptText(char *text, char *keyNew)
|
|||||||
return noOutput(checkExitCode);
|
return noOutput(checkExitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(key, keyNew);
|
key = strdup(keyNew);
|
||||||
|
|
||||||
//REDEFINE keyLength
|
//REDEFINE keyLength
|
||||||
setKeyLength(strlen(key));
|
setKeyLength(strlen(key));
|
||||||
} else //LOAD KEY
|
} else //LOAD KEY
|
||||||
{
|
{
|
||||||
|
key = malloc(getKeyLength() + 1);
|
||||||
|
|
||||||
generateKey(key, getKeyLength());
|
generateKey(key, getKeyLength());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user