Skip to content

C cryptography tool with Caesar Cipher and Double Fence encryption

Notifications You must be signed in to change notification settings

BorkedFork/cst120-intro-c-hw4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Cryptography Tool

A C console application implementing Caesar Cipher and Double Fence encryption algorithms.

Description

This program provides two classical encryption methods: Caesar Cipher (shift cipher) and Double Fence (rail fence) cipher. Users can encrypt text using either method, demonstrating fundamental cryptographic techniques.

Features

  • Caesar Cipher Encryption: Shifts letters by a specified key value
    • Preserves letter case (uppercase/lowercase)
    • Handles wraparound (Z+1 → A)
    • Non-alphabetic characters remain unchanged
  • Double Fence Encryption: Alternates characters between two strings
    • Splits input into even and odd positions
    • Concatenates for encrypted output
  • Character Handling: Works with both uppercase and lowercase letters
  • ASCII Manipulation: Direct character code arithmetic

Technologies Used

  • C Programming Language
  • <stdio.h> for I/O
  • <string.h> for string manipulation
  • <stdlib.h> for utilities
  • Character array manipulation
  • Visual Studio project structure

Encryption Methods

Caesar Cipher

Shifts each letter by a fixed number of positions in the alphabet. Example with key=3:

  • "HELLO" → "KHOOR"
  • "abc" → "def"

Double Fence

Splits characters into two groups (even/odd positions) and concatenates. Example:

  • "HELLO" → "HLOEL" (positions 0,2,4 + positions 1,3)

Building and Running

Prerequisites

  • C compiler (Visual Studio recommended)
  • Windows operating system

Build Instructions

  1. Open the solution file in Visual Studio
  2. Build the solution (F7 or Build > Build Solution)
  3. Run the executable or press F5

Author

Christian Burnett

About

C cryptography tool with Caesar Cipher and Double Fence encryption

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages