Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i = 0;
- int j = 0;
- int error = 0;
- for (int k = 0; k < 10; k++)
- {
- while(crypto_message[j] != '\0' && error == 0) {
- if (crypto_message[j] - dictionary[k][i] < 0)
- {
- if(isalnum(crypto_message[j] - dictionary[k][i] + 255) != 0 || ispunct(crypto_message[j] - dictionary[k][i] + 255) != 0 || isspace(crypto_message[j] - dictionary[k][i] + 255) != 0) {
- }
- else {
- error = 1;
- }
- }
- else
- {
- if(isalnum(crypto_message[j] - dictionary[k][i]) != 0 || ispunct(crypto_message[j] - dictionary[k][i]) != 0 || isspace(crypto_message[j] - dictionary[k][i]) != 0) {
- }
- else {
- error = 1;
- }
- }
- i++;
- j++;
- if (dictionary[k][i] == '\0')
- {
- i = 0;
- }
- }
- if(error == 1) {
- i = 0;
- j = 0;
- error = 0;
- }
- else {
- strcpy((char *)password, (const char *)dictionary[k]);
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement