01 // PROJECT AT A GLANCE
DUO STUMPER 3
CEncrypting and decrypting a file with Julius Caesar's two-thousand-year-old secret code.
The Caesar cipher shifts each letter by a fixed number of positions in the alphabet. Trivially simple in theory, but the program has to read an entire file, preserve anything that is not a letter, handle negative shifts and shifts larger than the alphabet, and work in both directions.
A command-line tool encrypting a file (-f) or a string (-s) by alphabetic shift, writing the result into a « crypt » file, with an alphabet table allocated at runtime for lower and upper case.
PRIMARYC
DELIVERY2-PERSON TEAM
VERIFICATIONCriterion
SOURCEINSPECTOR READY
03 // KEY OUTCOMES
- Encryption preserving case and leaving everything non-alphabetic untouched
- Shift brought back into [1;26]: negative and out-of-range values accepted, the direction resting on the sign alone
BEYOND THE BRIEF
- A complete embedded library with my_printf and get_next_line, reused as is under time pressure
- Criterion tests despite the timed format
04 // SOURCE TREE
READING SOURCE…