0% found this document useful (0 votes)
45 views

Vigenere Flowchart

The document describes a program that performs encryption or decryption on input text using a key. It initializes variables like the mode (encryption/decryption), keyindex, and character array. It then loops through each character in the input text, applying the encryption/decryption by manipulating the character value based on the key and mode. After processing all characters, it outputs the encrypted/decrypted text.

Uploaded by

Teacher One
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Vigenere Flowchart

The document describes a program that performs encryption or decryption on input text using a key. It initializes variables like the mode (encryption/decryption), keyindex, and character array. It then loops through each character in the input text, applying the encryption/decryption by manipulating the character value based on the key and mode. After processing all characters, it outputs the encrypted/decrypted text.

Uploaded by

Teacher One
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

START

Prompt :
"Enter input
text: "
INPUT
inputtext

Prompt :
"Enter key: "
INPUT key

Prompt : "Enter
encryption or
decryption (e/d):
"
INPUT modetype

posttext = ""

keyindex = 0

IF lowercase IF lowercase
True modetype is "e" False modetype is "d"

mode = 1 mode = -1 IF inputtext[ind]


True is uppercase
char = char mod 26

posttext = posttext +
uppercase of False keyindex = keyindex
chars = ['a', 'b', 'c', 'd',
chars[char] mod length of key
'e', 'f', 'g', 'h', 'i', 'j', 'k',
IF mode is 1 or
'l', 'm', 'n', 'o', 'p', 'q', 'r',
mode is -1 's', 't', 'u', 'v ', 'w', 'x' , 'y', posttext = posttext +
'z'] chars[char]
keyindex = keyindex
+1

False
ind = 0

posttext = posttext + char = char +


ind = ind + 1 mode*(index in
PRINT "Invalid
inputtext[ind]
chars of (lowercase
encrypt /
of key[keyindex]))
decrypt input"
IF ind < (l engt h of
False
inputtext)

IF lowercase of char = index in chars


False
inputtext[ind] in True of (lowercase of
chars inputtext[ind])

PRINT
END
posttext

You might also like