Skip to content

JacobGrisham/Encryption-Arrays-using-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encryption: Arrays using C

  • Caesar: Encryption by shifting each characters in each word that is inputted via command line
  • I wrote most of the code in each file. No code was provided by the instructor.

Caesar Program Demo

💡Lessons Learned

  • Working with ASCII values, which is one step above binary code (lowest level)
  • Strings are an abstraction for an array of characters
  • Applying knowledge of null terminating character at end of array of characters
  • Copying arrays from one to another
  • Adding command line arguments

🕹 How to Use

To run this project locally:

  • In your terminal, navigate to the root directory of this project and run the following commands
$ clang -o caesar caesar.c
$ ./caesar 13

Where 13 is the number of ASCII values that your inputted text is shifted. In other words, it's the key to unlock the encryption. The program will prompt you input your sample text after plaintext:

$ plaintext:  hello, world

The expected result for the above example is

$ ciphertext: uryyb, jbeyq

📝 Lecture Notes

  • printf("/n") creates a new line

📣 Contributions

MichealDim02