Description This assignment has you writing an encrypting / decryptingutility for Linux. This utilit

Description This assignment has you writing an encrypting / decryptingutility for Linux. This utilit | savvyessaywriters.org

Description This assignment has you writing an encrypting / decryptingutility for Linux. This utility will take any ASCII file andencrypt it in such a way that its contents are not readable – untilthey are decrypted by the utility. Requirements 1. The utility needs to be called cryptoMagic and needs to bewritten in C a. The utility has 2 command-line switches – they are–encrypt and –decrypt b. If none of these switches is specified, then –encrypt isassumed c. The utility also takes the name of an ASCII input file toencrypt/decrypt as an argument. d. For example: cryptoMagic –encrypt myFile.txt will encrypt thecontents of the myFile.txt file cryptoMagic myFile.txt will encrypt the contents of themyFile.txt file cryptoMagic –decrypt myFile.crp will decrypt the contents of themyFile.crp file 2. When the utility is asked to –encrypt an ASCII file, it willtake the input filename and produce the encrypted file with thesame base filename and an .crp file extension a. For example: cryptoMagic –encrypt myFile.txt will produce anencrypted file called myFile.crp 3. When the utility is asked to –decrypt an encrypted file, itwill take the input filename and produce the decrypted file withthe same base filename and an .txt file extension a. For example: cryptoMagic –decrypt myFile.crp  will produce adecrypted file called myFile.txt 4. It should be noted that the input file can have any fileextension. When asked to encrypt, you need to replace the existingfile extension (if any) with .TXT. Similarly when asked to decrypt,you need to replace the existing file extension (if any) with.CRP 5. Each line (up to and including the carriage return (noted asbelow)) in the unencrypted ASCII file is guaranteed of being lessthan 120 characters. While processing the input ASCII file you needto process one line at a time. Continue to process the input fileuntil you reach the end of the file Please note that it is not guaranteed that each line actuallyends in a carriage return … how will you handle that? 6. The encryption scheme is applied to each character in theline: a. If the character is a (ASCII value 9) then simply transformit into the output character sequence TT. b. The carriage return characters are not to be encrypted – theyare left as is in the resultant output file (the in the examplebelow is meant for illustration only – do not output “”) c. If is not a tab or a carriage return character, then applythe encryption scheme in steps d through f below d. Take the ASCII code for the input character and subtract avalue of 16 from it. Let’s call this resultant value “outChar” e. If the resulting outChar value is less than 32, then anotherstep must be taken: outChar = (outChar – 32) + 144 f. You need to write the ASCII value of the new encryptedcharacter (i.e. outChar) to the destination file as a 2 digithexadecimal value. Note that this will effectively double the length of the inputline in terms of size 7. Each line (up to an including the carriage return (if itexists)) in the encrypted ASCII file is guaranteed of being lessthan 255 characters. Remember – while processing the input ASCIIfile you need to process one line at a time The decryption scheme is applied to each pair of characters inthe input line: a. You need to see if the pair of characters you are processingis the sequence TT – if so, then simply transform this pair ofcharacters into a character (ASCII value 9) in the output file. b. If the pair of characters is not the sequence TT, thentranslate the first character of the pair by multiplying its facevalue by 16. Remember that hex values of A through F take on theface values of 10 through 15. Then add the face value of the secondcharacter in the pair. Let’s call the resulting value“outChar”. For example: i. Reading the pair of characters “38” from theencrypted file will translate into an outChar value of 56decimal. c.Now you need to add 16 to outChar. d. If the resulting outChar value is greater than 127, thenanother step must be taken: outChar = (outChar – 144) + 32 e. The outChar value now contains the decrypted ASCII code forthe character that you have just decoded. So take this decryptedcharacter value (i.e. outChar) and write it to the destination fileas a character f. The carriage return characters are not to be decrypted – theyare left as is in the resultant file. For example – if the input(encrypted) file is:4458596380555E5362696064595F5E80635358555D55805963806062556464698067555962548E39635E87648059642F812FThen the decrypted file is: This encryption scheme is pretty weird.Isn’t it?!?   9.. It is expected that your cryptoMagic utility has been tested(perhaps by using the above examples) as well as with any otherencrypted / decrypted examples you can think of. Don’t forget aboutthe extreme / boundary test cases! 10. It is expected that your cryptoMagic utility has beendesigned using modular techniques (i.e. the program has beenwritten using functions that you’ve created). a. The solution must have at least 2 source files and 1 includefile b. There should be no debugging messages present in your finalsubmitted utility 11. Your solution structure must include a makefile. I am in college and new to this, please make it as basic aspossible , Thanks You create your own ascii files to encrypt and decrypt . . .

 

Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code “Newclient” for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.


The post Description This assignment has you writing an encrypting / decryptingutility for Linux. This utilit appeared first on Affordable Nursing Writers.