Documentation ¶
Overview ¶
Package vinegar provides a Vigenere table builder and encryption/decryption tools for encoding and decoding plaintext and its corresponding ciphertext.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vigenere ¶
type Vigenere interface { // Encrypt encrypts the given message using the keyword provided // according to the vigenere table of the Vigenere struct. Encrypt(message, keyword string) string // Decrypt decrypts the provided ciphertext using the keyword and // vigenere table from the struct - the resulting plaintext will have no spaces. Decrypt(cipher, keyword string) string }
func NewVigenere ¶
NewVigenere produces a Vigenere Table using the given keyword. It first will format the keyword given by removing any duplicates and enforcing it to be 26 lowercasse latin characters. Once formatted the table is produced by shifting the alphabet 26 times maaking a 26x26 matrix of runes
Click to show internal directories.
Click to hide internal directories.