Write a C++ Program using constructor, friend and const functions to decrypt the ciphertext into plain text. This scheme

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a C++ Program using constructor, friend and const functions to decrypt the ciphertext into plain text. This scheme

Post by answerhappygod »

Write A C Program Using Constructor Friend And Const Functions To Decrypt The Ciphertext Into Plain Text This Scheme 1
Write A C Program Using Constructor Friend And Const Functions To Decrypt The Ciphertext Into Plain Text This Scheme 1 (340.75 KiB) Viewed 42 times
Please don't post screenshots.
Write a C++ Program using constructor, friend and const functions to decrypt the ciphertext into plain text. This scheme of cipher uses a text string (say, a word) as a key, which is then used for doing a number of shifts on the plaintext. For example, let's assume the key is 'point'. Each alphabet of the key is converted to its respective numeric value: In this case, p→ 16, 0 → 15, i → 9, n→ 14, and t → 20. Thus, the key is: 16 15 9 14 20. The sender and the receiver decide on a key. Say 'point' is the key. Numeric representation of this key is [16, 15, 9, 14, 20] The sender wants to decrypt the message, say 'PHBNVz'. He will arrange cipher test and numeric key to get the plain text as "Attack" (Toggle Case of each letter) p H B N V Z p-16 0-15 i-9 n-14 t-20 p-16 A t t a с K He now left shifts each ciphertext by alphabet by the number written below it to create plain text as shown below : Note: Toggle the case of Plain text while decrypting Input PHBNVZ point Output [16, 15, 9, 14, 20, 16] Attack
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply