/*+-----------------------------------------+
|Name: Password Decryptor |
|Programmed By: psybuck2002us |
|Date: May 10, 2005. |
|Compiler: Borland C++ Builder 5.02 |
+-----------------------------------------+
*/
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
#define z 122
#define a 97
#define max 80
int main(void)
{
int count, i, j, k;
int pword[max];
printf("----========== Password Encryptor ==========----\n\n\nEnter Password: ");
for(count = 0; (pword[count] = getchar()) != '\n'; count++)
{
pword[count] = tolower(pword[count]);
(pword[count] == z) ? pword[count] = a : pword[count] += 1;
for(i = 0; i < 6; i++)
{
(pword[count] == a) ? pword[count] = z : pword[count] -= 1;
}
for(j = 0; j < 11; j++)
{
(pword[count] == z) ? pword[count] = a : pword[count] += 1;
}
}
printf("\nEncrypted Password: ");
for(k = 0; k <= count; k++)
{
printf("%c", pword[k]);
}
getch();
return 0;
}