A header-only implementation of the Caesar Cipher in C.
  • C 90.5%
  • Shell 9.5%
Find a file
2026-06-14 15:53:10 +10:00
.gitignore Initial commit 2026-06-14 15:53:10 +10:00
build.sh Initial commit 2026-06-14 15:53:10 +10:00
caesar.h Initial commit 2026-06-14 15:53:10 +10:00
main.c Initial commit 2026-06-14 15:53:10 +10:00
ReadMe.md Initial commit 2026-06-14 15:53:10 +10:00
UNLICENSE Initial commit 2026-06-14 15:53:10 +10:00

Caesar Cipher

Overview

This program is an implementation of the Caesar Cipher.

https://en.wikipedia.org/wiki/Caesar_cipher

The following steps are performed during encryption:

  • Read the plain text input string.
  • Remove all non-alpha characters from the string.
  • Convert any lower case characters to upper case.
  • Apply the cipher.
  • Display the encrypted text.

Build

Use the following command to build the program:

./build.sh

Usage

To encrypt a string:

./caesar -e "STRING TO ENCRYPT"

The above command returns:

VWULQJWRHQFUBSW

To decrypt a string:

./caesar -d VWULQJWRHQFUBSW

The above command returns:

STRINGTOENCRYPT