-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathKey.java
More file actions
59 lines (51 loc) · 960 Bytes
/
Key.java
File metadata and controls
59 lines (51 loc) · 960 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
public class Key {
//instance variables
String cipher;
String plain;
public Key(String cipher, String plain) {
this.cipher = cipher;
this.plain = plain;
}
/**
* getCipher - returns cipher
*
* @return cipher
*/
public String getCipher() {
return cipher;
}
/**
* setCipher - updates cipher name
*
* @param newCipher new value of cipher
*/
public void setCipher(String newCipher) {
cipher = cipher;
}
/**
* getPlain - returns plain
*
* @return plain
*/
public String getPlain(){
return plain;
}
/**
* setPlain - updates plain name
*
* @param newPlain new value of plain
*/
public void setPlain(String newPlain){
plain = plain;
}
/**
* toString - returns contents of object
*
* @return result
*/
public String toString() {
String result;
result ="Ciphered text = " + cipher;
result +="Plain text = " + plain;
return result;
}}