Question: 10:25 2. Transposition Cipher (encrypt.c) A very simple transposition cipher encrypt(S) can be described by the following rule: o If the length of S is

 10:25 2. Transposition Cipher (encrypt.c) A very simple transposition cipher encrypt(S)

10:25 2. Transposition Cipher (encrypt.c) A very simple transposition cipher encrypt(S) can be described by the following rule: o If the length of S is 1 or 2, then encrypt(S) is S. o If S is a string of N characters s1 S2...SN and k-IN/2], then enc(S) encrypt(skSk-1. .s251)+ encrypt(snsN-1 .SK) where indicates string cancatenation. For example, encrypt("OK")-"OK" and encrypt("12345678-34127856 Write a program to implement this cipher, given an arbitary text string from keyboard, up to 8192 characters. It's better to write a separate encryption function, similar to the following char encrypt(char string size t length) I you fi11 this out ) Input Format: an abitary string (with the length up to 8192 characters) Sample Input: Test early and often! Output Format Line 1: One integer: the toal number of characters in the string. Line 2: The enciphered string. Sample Output: 21 aeyrleT sttflenn aod

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!