-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEncryptor.java
More file actions
executable file
·44 lines (39 loc) · 881 Bytes
/
Encryptor.java
File metadata and controls
executable file
·44 lines (39 loc) · 881 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
/* vim: set tw=80 ts=4 sts=4 sw=4 et: */
/**
* Interface for various encryption programs.
*
* @author Corey Christensen
* @since 31 Jan 2007
*/
public interface Encryptor {
/**
* Encrypts a string
*
* @param message String to encrypt
* @return Encrypted string
*/
public String encrypt(String message);
/**
* Decrypts a string
*
* @param message String to decrypt
* @return Decrypted string
*/
public String decrypt(String message);
/**
* Generates a new encryption key
*/
public void generateNewKey();
/**
* Sets the encryption key
*
* @param key New key to use
*/
public void setKey(String key);
/**
* Returns the encryption key currently used
*
* @return Encryption key
*/
public String getKey();
}