AssignmentType: Lab
PublishType: Scheduled
Description: "<style type="text/css">\r\n		@page { margin: 2cm }\r\n		pre { font-family: "Nimbus Mono L", monospace }\r\n		p { margin-bottom: 0.21cm }\r\n	</style>\r\n\r\n\r\n<p><font face="Times, serif"><font style="font-size: 11pt">Vigenere is a polyalphabetic cipher, where based on a key, each letter is shifted by a different amount. For <font face="Times New Roman, serif">example of the key is "almost", then in the plain text,</font></font></font></p><p></p><ul><li><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif;">the first letter is shifted 0 (a = 0)</span></li><li><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;">the second letter is shifted 11 (l = 11)</span></li><li><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;">the third letter is shifted 12 (m = 12)</span></li><li><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;">the fourth letter is shifted 14 (o = 14)</span></li><li><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;">the fifth letter is shifted 18 (s = 18)</span></li><li><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;">the sixth letter is shifted 19 (t = 19)</span></li><li><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;">the seventh letter is shifted 0 (wrap around and use a = 0 again)</span></li><li><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;">the eighth letter is shifted 11 (wrap around and use l = 11 again)&nbsp;</span></li><li>...</li></ul><font face="Times New Roman, serif"><font style="font-size: 11pt">For example, if the key is "</font></font><font face="Times New Roman, serif"><font style="font-size: 11pt">HI" ;&nbsp;</font></font><font face="Times New Roman, serif"><font style="font-size: 11pt">plain text "SECRET" will map to ciphertext "ZMJZLB":</font></font><div><font face="Times New Roman, serif"><span style="font-size: 14.6667px;"><br></span></font></div><div><font face="Times New Roman, serif"><span style="font-size: 14.6667px;">S + H = S + 7 = Z</span></font></div><div><font face="Times New Roman, serif"><span style="font-size: 14.6667px;">E + I = E + 8 = M</span></font></div><div><font face="Times New Roman, serif"><span style="font-size: 14.6667px;">C + H = C + 7 = J</span></font></div><div><font face="Times New Roman, serif"><span style="font-size: 14.6667px;">R + I = R + 8 = Z</span></font></div><div><font face="Times New Roman, serif"><span style="font-size: 14.6667px;">E + H = E + 7 = L</span></font></div><div><font face="Times New Roman, serif"><span style="font-size: 14.6667px;">T + I = T + 8 = B</span></font></div><div><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif;"><br></span></div><div><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif;">Write a code to encrypt/ decrypt input text based on input parameters as shown in example below.</span></div><div><br></div><div><p><b style="font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;">Example usage:&nbsp;</b></p><p><span style="background-color: rgb(245, 245, 245); font-family: &quot;Times New Roman&quot;, serif; font-size: 11pt;"><b>Input Format:</b></span><br></p><p><font face="Times New Roman, serif"><span style="font-size: 14.6667px; background-color: rgb(245, 245, 245);">&lt;type&gt;</span></font></p><p><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);">&lt;key&gt;</span></p><p><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);">Input Text</span></p><p><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);"><b>Output Format:</b></span></p><p><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);">Output Text</span></p><p>Note: &lt;type&gt; is either e (for encryption) or d (for decryption)&nbsp;</p><p><br></p><p><br></p><p><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif;"><b>Sample Test Case:</b></span></p><p><font style="font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245); font-size: 12pt;">Case 1 (Encryption):</font><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);">&nbsp;&nbsp;</span></p><p><font face="Times, serif"><font style="font-size: 11pt"><font face="Times New Roman, serif"><b>Input :</b></font></font></font></p><p><font face="Times, serif"><font style="font-size: 11pt"><font face="Times New Roman, serif">e</font></font></font></p><p><font face="Times, serif"><font style="font-size: 11pt"><font face="Times New Roman, serif">HI</font></font></font></p><p><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);">SECRET</span></p><p><b>Output :</b></p><p><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);">ZMJZLB</span></p><p><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);"><br></span></p><p><font style="font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245); font-size: 12pt;">Case 2 (Decryption):</font><span style="font-size: 11pt; font-family: &quot;Times New Roman&quot;, serif; background-color: rgb(245, 245, 245);">&nbsp;&nbsp;</span></p><p><font face="Times, serif"><font style="font-size: 11pt;"><font face="Times New Roman, serif"><span style="font-weight: 700;">Input :</span></font></font></font></p><p><font face="Times, serif"><font style="font-size: 11pt;"><font face="Times New Roman, serif">d</font></font></font></p><p><font face="Times, serif"><font style="font-size: 11pt;"><font face="Times New Roman, serif">HI</font></font></font></p><p><span style="background-color: rgb(245, 245, 245); font-family: &quot;Times New Roman&quot;, serif; font-size: 16px;">ZMJZLB</span></p><p><span style="font-weight: 700;">Output :</span></p><p><span style="font-family: &quot;Times New Roman&quot;, serif; font-size: 16px; background-color: rgb(245, 245, 245);">SECRET</span><br></p><h5><b><i>Note: key and input contains Upper Case Alphabets (A-Z) only.</i></b></h5><style type="text/css">\r\n		@page { margin: 2cm }\r\n		p { margin-bottom: 0.21cm }\r\n	</style><style type="text/css">\r\n		@page { margin: 2cm }\r\n		p { margin-bottom: 0.21cm }\r\n	</style><style type="text/css">\r\n		@page { margin: 2cm }\r\n		td p { margin-bottom: 0cm }\r\n		pre { font-family: "Nimbus Mono L", monospace }\r\n		p { margin-bottom: 0.21cm }\r\n		code { font-family: "Courier New", monospace }\r\n	</style><style type="text/css">\r\n		@page { margin: 2cm }\r\n		pre { font-family: "Nimbus Mono L", monospace }\r\n		p { margin-bottom: 0.21cm }\r\n	</style><style type="text/css">\r\n		@page { margin: 2cm }\r\n		pre { font-family: "Nimbus Mono L", monospace }\r\n		p { margin-bottom: 0.21cm }\r\n	</style><style type="text/css">\r\n		@page { margin: 2cm }\r\n		pre { font-family: "Nimbus Mono L", monospace }\r\n		p { margin-bottom: 0.21cm }\r\n	</style><style type="text/css">\r\n		@page { margin: 2cm }\r\n		pre { font-family: "Nimbus Mono L", monospace }\r\n		p { margin-bottom: 0.21cm }\r\n	</style></div><style type="text/css">\r\n		@page { margin: 2cm }\r\n		pre { font-family: "Nimbus Mono L", monospace }\r\n		p { margin-bottom: 0.21cm }\r\n	</style>"
PublishOn: 2019-08-13 12:00
Deadline: 2019-08-18 22:00
FreezingDeadline: 2019-08-18 23:00
CalculateExecutionTime?: True
SendGradingEmailsToAll?: False
AdvanceCorrectnessChecker?: False
OrderIsImportant?: False
EnterValueOfErrorRate: 0.0
SeeHowWellStudentsIndentTheirCode?: False
GraphicsProgram?: False
ProgrammingLanguage: C++
FilesToBeSubmitted: vignere.cpp

