@@ -8,7 +8,7 @@ int main(){
88 unsigned char plainText [BYTES + 1 ]; // plaintext
99 unsigned char cipherText [BYTES + 1 ]; // ciphertext
1010 unsigned char key [BYTES + 1 ]; // encryption key
11- unsigned char output [BYTES + 1 ]; // strign to prints the results
11+ unsigned char output [BYTES + 1 ]; // string to prints the results
1212
1313 int answer ; // user answer
1414
@@ -38,8 +38,8 @@ int main(){
3838 readInput (key );
3939
4040 // convert plaintext and key to 4x4 blocks
41- convertStringTo4x4Block (plainText , state4x4 );
42- convertStringTo4x4Block (key , key4x4 );
41+ convertStringToBlock (plainText , state4x4 );
42+ convertStringToBlock (key , key4x4 );
4343
4444 // we calculate all round keys 1-10
4545 key_schedule (w , key4x4 );
@@ -48,7 +48,7 @@ int main(){
4848 encryption (state4x4 , w );
4949
5050 // print the output to user as string
51- convert4x4BlockToString (state4x4 , output );
51+ convertBlockToString (state4x4 , output );
5252 output [BYTES ] = '\0' ;
5353 printf ("Ciphertext: %s" , output );
5454 break ;
@@ -63,8 +63,8 @@ int main(){
6363 readInput (key );
6464
6565 // convert ciphertext and key to 4x4 blocks
66- convertStringTo4x4Block (cipherText , state4x4 );
67- convertStringTo4x4Block (key , key4x4 );
66+ convertStringToBlock (cipherText , state4x4 );
67+ convertStringToBlock (key , key4x4 );
6868
6969 // we calculate all round keys 1-10
7070 key_schedule (w , key4x4 );
@@ -73,7 +73,7 @@ int main(){
7373 decryption (state4x4 , w );
7474
7575 // print the output to user as string
76- convert4x4BlockToString (state4x4 , output );
76+ convertBlockToString (state4x4 , output );
7777 output [BYTES ] = '\0' ;
7878 printf ("Plaintext: %s" , output );
7979 break ;
@@ -88,18 +88,18 @@ int main(){
8888 readInput (key );
8989
9090 // convert plaintext and key to 4x4 blocks
91- convertStringTo4x4Block (plainText , state4x4 );
92- convertStringTo4x4Block (key , key4x4 );
91+ convertStringToBlock (plainText , state4x4 );
92+ convertStringToBlock (key , key4x4 );
9393
9494 // we calculate all round keys 1-10
9595 key_schedule (w , key4x4 );
9696
97- printf ("ENCRYPTION \n" );
97+ printf ("\nENCRYPTION \n" );
9898 // encrypt the plaintext
9999 encryption (state4x4 , w );
100100
101101 // print the output to user as string
102- convert4x4BlockToString (state4x4 , output );
102+ convertBlockToString (state4x4 , output );
103103 output [BYTES ] = '\0' ;
104104 printf ("Ciphertext: %s\n" , output );
105105 printf ("END OF ENCRYPTION\n" );
@@ -109,7 +109,7 @@ int main(){
109109 decryption (state4x4 , w );
110110
111111 // print the output to user as string
112- convert4x4BlockToString (state4x4 , output );
112+ convertBlockToString (state4x4 , output );
113113 output [BYTES ] = '\0' ;
114114 printf ("Plaintext: %s\n" , output );
115115 printf ("END OF DECRYPTION\n" );
0 commit comments