|
C Fundamentals
Algorithms · data structures · cryptography · systems — pure C11, zero deps
|
CLI for Caesar / Vigenère / XOR ciphers + SHA-256 hashing. More...
#include "caesar.h"#include "sha256.h"#include "vigenere.h"#include "xor_cipher.h"#include <getopt.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| static char * | join_args (int argc, char *argv[], int start) |
| int | main (int argc, char *argv[]) |
| static void | print_usage (const char *prog) |
CLI for Caesar / Vigenère / XOR ciphers + SHA-256 hashing.
Usage: crypto-cli -e SHIFT "text" # Caesar encrypt crypto-cli -d SHIFT "text" # Caesar decrypt crypto-cli -c "ciphertext" # Caesar crack via chi-squared crypto-cli -v –key=KEY "text" # Vigenère encrypt crypto-cli -V –key=KEY "ciphertext" # Vigenère decrypt crypto-cli -x –key=KEY "text" # XOR (encrypt = decrypt) crypto-cli -s "text" # SHA-256 → hex
Definition in file algorithms/encryption/main.c.
|
static |
Definition at line 35 of file algorithms/encryption/main.c.
Referenced by main().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 49 of file algorithms/encryption/main.c.
References caesar_crack(), caesar_decrypt(), caesar_encrypt(), join_args(), print_usage(), sha256(), SHA256_DIGEST_BYTES, SHA256_HEX_BYTES, sha256_to_hex(), vigenere_decrypt(), vigenere_encrypt(), and xor_apply().
|
static |
Definition at line 24 of file algorithms/encryption/main.c.
Referenced by main().