Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pointer Exercise in C++: In this exercise, you will be given a key and a message encrypted using Vigenre Encryption . Your goal is to

Pointer Exercise in C++:

In this exercise, you will be given a key and a message encrypted using Vigenre Encryption. Your goal is to decrypt this message with the given key.

Input format:

  1. Key size
  2. Key chars (decimals representing ascii values)
  3. Message size
  4. Message chars (decimals representing ascii values)

Notes:

  1. All chars in key will only be lowercase alphabets
  2. In char array (char[]), there must be a \0 at the end (ascii = 0)
  3. The problem already added \0 at the end of key and message

How does Vigenre Encryption work?

  1. Message: This is an example case.
  2. Key: example

What about Decryption? Just change + to -

Here's the example:

You can refer to this code template as attached below:

The txt file is as provided below:

5 100 101 109 111 0

136 94 94 94 32 70 115 122 117 117 101 102 105 111 101 102 119 114 114 101 33 32 94 94 94 10 77 114 121 32 98 111 118 119 32 102 118 104 32 104 113 97 114 46 10 84 120 115 100 119 113 32 98 100 113 113 32 109 114 121 100 32 116 108 112 113 32 119 113 32 120 116 115 32 105 115 100 97 100 120 32 97 116 32 118 120 103 114 104 114 112 87 71 95 80 77 80 49 49 46 102 116 98 44 32 10 111 113 104 32 101 105 101 113 117 104 32 108 120 32 102 99 32 72 51 44 32 120 116 111 113 111 101 32 58 41 0

Reminder: code in C++ only.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

ISBN: 0764549634, 9780764549632

More Books

Students also viewed these Databases questions