mirror of
https://bitbucket.org/Mattrixwv/pypherstream.git
synced 2025-12-06 10:33:58 -05:00
61 lines
2.2 KiB
Python
61 lines
2.2 KiB
Python
#PypherStream/Vigenere.py
|
|
#Matthew Ellison
|
|
# Created: 03-30-19
|
|
#Modified: 03-30-19
|
|
#This file contains the Vigenere class for the PypherStream Project.
|
|
#This class takes input and uses a Vigenere Cipher to encode or decode a message.
|
|
#This is a Python port of the CipherStream program found at https://bitbucket.org/Mattrixwv/CipherStream
|
|
|
|
|
|
class Vigenere:
|
|
__version = "1.0" #The current library's version number
|
|
def __init__(self):
|
|
self.__inputString = "" #This is the string that you want to encode or decode
|
|
self.__outputString = "" #This is the string that is output from encoding or decoding
|
|
self.__keyword = "" #This is the keyword that is the resposible for determining the offsets that you change each character by
|
|
self.__offset = [] #This holds the offsets computed from each character in the keyword
|
|
#Uses keyword to calculate the offset for the Caesar cipher for each character
|
|
def __setOffset(self):
|
|
NotImplemented
|
|
#Sets inputString
|
|
def __setInputString(self, input: str):
|
|
NotImplemented
|
|
#Sets keyword
|
|
def __setKeyword(self, key: str):
|
|
NotImplemented
|
|
#Encodes inputString and stores the result in outputString
|
|
def __encode(self) -> str:
|
|
NotImplemented
|
|
#Decodes inputString and stores the result in outputString
|
|
def __decode(self) -> str:
|
|
NotImplemented
|
|
#Returns the current inputString
|
|
def getInputString(self) -> str:
|
|
NotImplemented
|
|
#Returns the current outputString
|
|
def getOutputString(self) -> str:
|
|
NotImplemented
|
|
#Returns the current keyword
|
|
def getKeyword(self) -> str:
|
|
NotImplemented
|
|
#Returns the current offsets (Used mostly in bug fixing)
|
|
def getOffsets(self) -> list:
|
|
NotImplemented
|
|
#Encodes input using key and returns the result
|
|
def encode(self, key: str, input: str) -> str:
|
|
NotImplemented
|
|
#Decodes input usig key and returns the result
|
|
def decode(self, key: str, input: str) -> str:
|
|
NotImplemented
|
|
#Makes sure all of the variables are empty
|
|
def reset(self):
|
|
NotImplemented
|
|
#Returns the current version of the library
|
|
@classmethod
|
|
def getVersion(self) -> str:
|
|
NotImplemented
|
|
|
|
#This will run the appropriate commands if this script is called stand alone instead of with the rest of the PypherStream program
|
|
if __name__ == "__main__":
|
|
NotImplemented
|