Skip to content

A place holder project, a sandbox for my experience developer simple filters

License

Notifications You must be signed in to change notification settings

Blackmagicbox/cesarean-cypher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cesarean Cipher

License

Overview

This project implements a simple variation of the Caesar Cipher. It can be used to encode and decode text using a specified offset.

Prerequisites

  • A C compiler such as Clang or GCC
  • Make (for using the provided Makefile)

Compilation

The project includes a Makefile for easy compilation and running. The main commands are:

  • make all: Compiles the source code and runs the resulting program.
  • make build: Only compiles the source code without running the program.
  • make run: Runs the compiled program. It assumes the program has already been compiled.
  • make clean: Cleans up all build artifacts, removing the /build directory.

Usage

To use the program, you first need to compile it using the Makefile provided (make build). Once compiled, you can run it with the following command:

./cesarean-cypher <-rot| offset{a-z|A-Z}> [modifier{-d}]

Here, offset is the letter to shift by, and modifier is an optional argument that can be -d to decode the text. If you use -rot as the first argument, the program will use a default shift of 13 (ROT13).

Example:

To encode a message with a shift of 3, you can run:

echo "Hello, World!" | ./cesarean-cypher c

To decode the message, you can run:

echo "Khoor, Zruog!" | ./cesarean-cypher c -d

This will output the original message: "Hello, World!".

Implementation Details

  • The program is written in C and makes use of the ctype.h library to check and convert character case.
  • It applies an offset logic to shift alphabetic characters while leaving non-alphabetic characters unchanged.
  • The Makefile defines several targets for building and cleaning the project. It separates object files and binaries into distinct directories for organization.

File Structure

  • main.c: The main source file containing the Rot13 cipher logic.
  • Makefile: Defines the build instructions and commands for compiling and running the program.

License

This project is licensed under the GNU General Public License v3.0, dated 29 June 2007. Please review the license terms to understand what you are permitted to do with this software.

About

A place holder project, a sandbox for my experience developer simple filters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published