decrypt text for theirsecurity devices. As much as possible you are to develop t
ID: 3616164 • Letter: D
Question
decrypt text for theirsecurity devices. As much as possible you are to develop the codeas
independent functions.You are to USE NO GLOBAL VARIABLES and string library inyour
program. You shouldmanually encrypt and decrypt some text values to ensure that yourprogram
is working correctly.Write a menu driven program.
**** Main Menu****"
1. EncryptText
2. DecryptText
3. Exit.
Function forEncryption:- MaximumLength of Input Text is 22 characters. The allowable
characters and theirrespective bit pattern are available in table1. Create a list ofbit i.e. 22*6=132
and ignore last 4bits. Now match each four bits with Table 2 that will produce 32characters.
Finally you will haveto place “:”after four characters.
Function forDecryption:- MaximumLength of Input Text is 39 characters after each four
character a“:”placed and other allowable characters and their respective bitpattern are available
in table2. Just ignore“:”andcreate a list of bit i.e. 32*4=128 and attach 4 bits (0000) whichare
ignored in encryption.Now match each six bits with Table 1 that will produce 22characters text.
Exampleoutput:
*******************Welcome to Bolan Security Company Ltd *******************
**** Main Menu ****"
1. Encrypt Text
2. Decrypt Text
3. Exit.
Enter your Choice (1 to 3):1
Please enter 22 char text >>encyclopedia.com.pk-02
The encrypted text is:3973:2231:5619:38D4:8AF8:C616:F995:3F00
Enter your Choice (1 to 3):2
Please enter 22 char text>> 3973:2231:5619:38D4:8AF8:C616:F995:3F00
The decrypted text is:encyclopedia.com.pk-00
Enter your Choice (1 to 3):3
Thank You
Explanation / Answer
http://www.codeproject.com/KB/cpp/RC4-BASE64.aspx
little modification is required but these links will helpyou cc
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.