Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C PROGRAMMING Implement a function (using only #include library) that can encrypt/decrypt with a substitution cipher. cipher_sub (a, b, c, d) a is the string

C PROGRAMMING

Implement a function (using only #include library) that can encrypt/decrypt with a substitution cipher.

cipher_sub (a, b, c, d)

a is the string that has the data that will be encrypted or decrypted

b is the string that has the result of the encrypt/decrypt

c is the code string used for our substitution cipher (27 entries plus '\0' character)

d is an integer that will pass two constants defined as ENC (encrypt) or DEC (decrypt)

--> The function is supposed to return the character that is in the shifted array at the index (aka what is the character at index z)

**The length of the code is unknown (but can be figured out using '\0' character)

**Assume that strings of 27 (26 letters in the alphabet and the space "_") characters can be called, and that all the characters are unique (never repeated).

PLEASE COMMENT ON YOUR CODE EXPLAINING WHAT WAS DONE

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

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago