-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathcipher.py
67 lines (56 loc) · 2.38 KB
/
cipher.py
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
60
61
62
63
64
65
66
67
##############################################################################
# COMPONENT:
# CIPHER01
# Author:
# Br. Helfrich, Kyle Mueller, <your name here if you made a change>
# Summary:
# Implement your cipher here. You can view 'example.py' to see the
# completed Caesar Cipher example.
##############################################################################
##############################################################################
# CIPHER
##############################################################################
class Cipher:
def __init__(self):
# TODO: Insert anything you need for your cipher here
pass
def get_author(self):
# TODO: Return your name
return "author"
def get_cipher_name(self):
# TODO: Return the cipher name
return "cipher name"
##########################################################################
# GET CIPHER CITATION
# Returns the citation from which we learned about the cipher
##########################################################################
def get_cipher_citation(self):
# TODO: This function should return your citation(s)
return "citation"
##########################################################################
# GET PSEUDOCODE
# Returns the pseudocode as a string to be used by the caller
##########################################################################
def get_pseudocode(self):
# TODO: This function should return your psuedocode, neatly formatted
# The encrypt pseudocode
pc = "insert the encryption pseudocode\n"
# The decrypt pseudocode
pc += "insert the decryption pseudocode\n"
return pc
##########################################################################
# ENCRYPT
# TODO: ADD description
##########################################################################
def encrypt(self, plaintext, password):
ciphertext = plaintext
# TODO - Add your code here
return ciphertext
##########################################################################
# DECRYPT
# TODO: ADD description
##########################################################################
def decrypt(self, ciphertext, password):
plaintext = ciphertext
# TODO - Add your code here
return plaintext