3. Write a class to encrypt and decrypt a text file. The encryption step is described below:
a. Find N, where N is the length of the longest line in the file, or the number of lines in the file, whichever one is higher.
b. Find M, where M is and the next odd number bigger than or equal to N.
c. Allocate a two dimensional array of characters, of size MxM. Let’s call this array T. Initialize T so that all of its MxM element is a space character.
d. Fill each row of T with the corresponding line in the text file (row 0 filled with characters from the first line, starting from column 1, row 1 filled with characters from the second line, starting from column 1, row 2 filled with characters from the third line, starting from column 1, and so on..).
e. Write the content of T, starting from the center T[X][X], where X = M/2, and moving out in a spiral motion, counter clockwise, heading towards the left direction first, as shown in the diagram below:
T h e
q u i c k
b r o w n
f o x
i s v e r y
h u n g r y
t o n i g h t
The + sign are just to show you the number of spaces written, in your program you should write the space character, not write the + sign. Add the capability to decrypt as well. Your program should decrypt the encrypted file, and write the output to a new file, then compare this result with the original unencrypted file (ignore the space character during the comparison).