Skip to content

Antonio-88/Password_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Programming Utilities: Encryption, Text Templating, and Dynamic Encoding

A collection of optimized, low-level algorithmic utilities written in C. This repository features three separate programs demonstrating string manipulation, dynamic memory allocation, complex token tracking, bitwise manipulation, and runtime polymorphisim using arrays of function pointers.

Project Structure

The project is split into three main standalone utilities:

  1. Custom Key Shifter / Cipher (problema1.c)
  2. Text Autofill & Word Template Engine (problema2.c)
  3. Randomized Multi-Strategy String Encoder (problema3.c)

1. Custom Key Shifter (problema1.c)

An alphabetic string encryption tool inspired by classical ciphers. It processes an input text using a variable key sequence to displace character values.

Key Features

  • Input Validation: Restricts execution strictly to English alphabetical characters, discarding invalid combinations up-front.
  • Dynamic Key Adjustment: Truncates or extends the cipher key cyclically to precisely match the target string length.
  • Cross-Case Wrapping Shifter: Shifts character codes with a unique boundary wrap that transitions from lowercase 'z' directly to uppercase 'A', and uppercase 'Z' to lowercase 'a'.

2. Text Autofill Engine (problema2.c)

A template engine utility designed to replace defined metadata key placeholders inside unformatted texts while completely preserving structural positioning, punctuation, and spacing.

Key Features

  • Key-Value Dictionary Structure: Manages placeholder tags using custom heap-allocated pair struct arrays.
  • Punctuation & Layout Preservation: Pairs text tokenization (strtok) with a parallel tracking buffer (copie) to append non-alphanumeric separators accurately to the modified output stream.
  • Dynamic Buffer Scaling: Progressively grows and shrinks the destination string via runtime realloc boundaries to eliminate memory waste.

3. Randomized Multi-Strategy Encoder (problema3.c)

A randomized text generation and obfuscation framework that maps character structures through multiple algorithmic encoding pathways using dynamic function dispatch arrays.

Key Features

  • Pseudo-Random Deterministic Setup: Generates random text block strings using customizable bounds and a explicit seed value (srand).
  • Function Pointer Dispatching: Dispatches individual characters to processing routines dynamically at runtime via an array of function pointers (char* (*codificare[])(char)).
  • Encoding Strategies Included:
    • Strategy 1 (Frequency Mapping): Tracks character history counts globally using static arrays, outputting the symbol alongside its cumulative usage tally.
    • Strategy 2 (Bit Manipulation): Inverts target bit coordinates via XOR masking, aggregates total binary set bits (1-bits), applies manual mask bit overrides (| 32, & ~1), and packs both results into a composite output structure.
    • Strategy 3 (Case Transposition): Detects and transposes lowercase elements to their uppercase ASCII equivalents.

Technical Concepts Demonstrated

  • Advanced Memory Optimization: Clean implementations of dynamic data resizing (malloc, realloc, free) to guarantee zero memory leaks at termination.
  • Functional Programming in C: Executing decoupled behaviors via function pointer arrays.
  • Bitwise Arithmetic: Deep utilization of bit shifts (<<), bitwise XOR (^), bitwise OR (|), and bitwise AND (&) patterns for low-level value morphing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors