-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDecrypt.java
More file actions
32 lines (29 loc) · 734 Bytes
/
Decrypt.java
File metadata and controls
32 lines (29 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public class Decrypt extends Symmetric {
Decrypt(){}
Decrypt(String hash, String password)
{
super();
this.hash = hash;
}
void setData()
{
System.out.print("Enter Your Encrypted Text::> ");
this.hash = super.StrScanner.nextLine();
super.passwordSetter();
}
@Override
void show() {
System.out.println(message);
}
void decryptMain()
{
String temp = "";
int itemp;
for(int i=0;i<this.hash.length();i++)
{
itemp = (int) hash.charAt(i);
temp += String.valueOf(Character.toChars(itemp-(int)password.charAt(i%password.length())));
}
this.message = temp;
}
}