Saturday, 5 December 2015

A simple decryptor ( For a password encrypted from previous above encryptor)

import java.io.*;
class Encryptor
{
public static void main(String args[])
{
String in;
Console con=System.console();
int length=0;
System.out.print(" Enter your Encrypted password ");
in=con.readLine();
length=in.length();
char a[]= new char[length];
char b[]= new char[length];
for(int i=0;i<length;i++)
{
int temp;
a[i]=in.charAt(i);
}

System.out.print("\n Decrypted password is: ");
for(int i=0;i<length;i++)
{
int temp;
temp=((int)a[i])-i*i-3;
b[i]=(char)temp;
System.out.print(b[i]);
}
}
}

No comments:

Post a Comment