Question

give me a example Develop a set of functions that will allow you to encrypt a...

give me a example
Develop a set of functions that will allow you to encrypt a string using a Caesar cipher.
Develop a set of functions that will allow you to decrypt a string using a Caesar cipher.
Develop a set of functions that will help you to solve (break) a Caesar cipher.

Encrypt, Decrypt, Solve in COBOL
Encrypt, Decrypt, Solve in Fortran


0 0
Add a comment Improve this question Transcribed image text
Answer #1

The   usage   for   encrypt   and   decrypt   should   be   as   follows:  
encrypt(str, shiftAmount)
decrypt(str, shiftAmount)
Pascal   code   fragment:  
var
x: string;
y: string;
x = encrypt("This is a test string from Alan", 8);
writeln(x);
y = decrypt(x, 8);
writeln(y);
example   output:  
BPQA QA I BMAB ABZQVO NZWU ITIV
THIS IS A TEST STRING FROM ALAN
Things   might   be   easier   if   you   use   only   capital   letters,   so   consider   writing   a   “toUpper”   function  
so   that   you   can   deal   with   mixed-case   input.   It’s   okay   if   your   output   is   all   caps.  
The   usage   for   solve   should   be   as   follows:  
solve(str, maxShiftValue);
In   Pascal,   again:      
solve("HAL", 26);
example   output:  
Caesar 26: HAL
Caesar 25: GZK
Caesar 24: FYJ
Caesar 23: EXI
Caesar 22: DWH
Caesar 21: CVG
Caesar 20: BUF
Caesar 19: ATE
Caesar 18: ZSD
Caesar 17: YRC
Caesar 16: XQB
Caesar 15: WPA
Caesar 14: VOZ
Caesar 13: UNY
Caesar 12: TMX
Caesar 11: SLW
Caesar 10: RKV
Caesar 9: QJU
Caesar 8: PIT
Caesar 7: OHS
Caesar 6: NGR
Caesar 5: MFQ
Caesar 4: LEP
Caesar 3: KDO
Caesar 2: JCN
Caesar 1: IBM
Caesar 0: HAL

Add a comment
Know the answer?
Add Answer to:
give me a example Develop a set of functions that will allow you to encrypt a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • give me a example Develop a set of functions that will allow you to encrypt a...

    give me a example Develop a set of functions that will allow you to encrypt a string using a Caesar cipher. Develop a set of functions that will allow you to decrypt a string using a Caesar cipher. Develop a set of functions that will help you to solve (break) a Caesar cipher. Encrypt, Decrypt, Solve in BASIC 1 Encrypt, Decrypt, Solve in Scala (in a procedural manner)

  • Cryptography, the study of secret writing, has been around for a very long time, from simplistic...

    Cryptography, the study of secret writing, has been around for a very long time, from simplistic techniques to sophisticated mathematical techniques. No matter what the form however, there are some underlying things that must be done – encrypt the message and decrypt the encoded message. One of the earliest and simplest methods ever used to encrypt and decrypt messages is called the Caesar cipher method, used by Julius Caesar during the Gallic war. According to this method, letters of the...

  • please help solve Computer Eixercise Encrypt the following quote in four-letter blocks, using a. multiplication by 37 modulo 27989898. COMPUTERS ARE USELESS -THEY CAN ONLY GIVE YOU ANSWERS b. Fi...

    please help solve Computer Eixercise Encrypt the following quote in four-letter blocks, using a. multiplication by 37 modulo 27989898. COMPUTERS ARE USELESS -THEY CAN ONLY GIVE YOU ANSWERS b. Find the inverse of 37 in Z27989898 c. The following ciphertext message was encrypted using the method you used in part a (four-letter blocks, multiplication by 37 modulo 27989898). Decrypt the following message to reveal the name of the famous person to whom the quote in part a is attributed. 4589986...

  • please help me to solve (c and d) knowing that d=209 Let the two primes p...

    please help me to solve (c and d) knowing that d=209 Let the two primes p = 41 and q = 17 be given as set-up parameters for RSA. a. Which of the parameters e_1 = 32, e_2 = 49 is a valid RSA exponent? Justify your choice b. Compute the corresponding private key Kpr = (p, q, d). Use the extended Euclidean algorithm for the inversion and point out every calculation step. c. Using the encryption key, encrypt the...

  • Please help me write this Java program. I had posted this question before, but got an...

    Please help me write this Java program. I had posted this question before, but got an answer that was totally wrong. We are using the latest version of Java8. Thank You! -------------------------------------------------------------------------------------- Write a Java program that can successfully DECRYPT a string inputted by the user which has been encrypted using a Caesar Cipher with a unknown shift value(key). You can use brute force to do a for loop through all the 26 shift values, however, your program should only...

  • JAVA Problem: With the recent news about data breaches and different organizations having their clients’ information...

    JAVA Problem: With the recent news about data breaches and different organizations having their clients’ information being exposed, it is becoming more and more important to find ways to protect our sensitive data. In this program we will develop a simple tool that helps users generate strong passwords, encrypt and decrypt data using some cyphering techniques. You will need to create two classes. The first class is your driver for the application and contains the main method. Name this class...

  • Assignment 7: Caesar Cipher Assignment 7 You will create a Caesar cipher which allows the user...

    Assignment 7: Caesar Cipher Assignment 7 You will create a Caesar cipher which allows the user to specify the key and the text to be encrypted. A Caesar cipher is a simple substitution cipher wherein each letter in the message is shifted a certain number of spaces down the alphabet -- this number is called the key. a b c d e f g h i j k l m n o p q r s t u v w...

  • I need Help to Write a function in C that will Decrypt at least one word with a substitution cipher given cipher text an...

    I need Help to Write a function in C that will Decrypt at least one word with a substitution cipher given cipher text and key My Current Code is: void SubDecrypt(char *message, char *encryptKey) { int iteration; int iteration_Num_Two = 0; int letter; printf("Enter Encryption Key: \n");                                                           //Display the message to enter encryption key scanf("%s", encryptKey);                                                                   //Input the Encryption key for (iteration = 0; message[iteration] != '0'; iteration++)                               //loop will continue till message reaches to end { letter = message[iteration];                                                      ...

  • Using C++ Part C: Implement the modified Caesar cipher Objective: The goal of part C is...

    Using C++ Part C: Implement the modified Caesar cipher Objective: The goal of part C is to create a program to encode files and strings using the caesar cipher encoding method. Information about the caesar method can be found at http://www.braingle.com/brainteasers/codes/caesar.php.   Note: the standard caesar cipher uses an offset of 3. We are going to use a user supplied string to calculate an offset. See below for details on how to calculate this offset from this string. First open caesar.cpp...

  • Computer Science C++ Help, here's the question that needs to be answered (TASK D): Task D....

    Computer Science C++ Help, here's the question that needs to be answered (TASK D): Task D. Decryption Implement two decryption functions corresponding to the above ciphers. When decrypting ciphertext, ensure that the produced decrypted string is equal to the original plaintext: decryptCaesar(ciphertext, rshift) == plaintext decryptVigenere(ciphertext, keyword) == plaintext Write a program decryption.cpp that uses the above functions to demonstrate encryption and decryption for both ciphers. It should first ask the user to input plaintext, then ask for a right...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT