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 decrypt

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:

Key size, Key chars (decimals representing ascii values), Message size, Message chars (decimals representing ascii values)

Notes:

All chars in key will only be lowercase alphabets

In char array (char[]), there must be a \0 at the end (ascii = 0)

The problem already added \0 at the end of key and message

How does Vigenre Encryption work?

Message: This is an example case.

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: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

In your own words, summarize the primary objectives of unions.

Answered: 1 week ago

Question

Question What are the requirements for a safe harbor 401(k) plan?30

Answered: 1 week ago