Skip to content

zalaghi-dev/crypto-lab

Repository files navigation

Crypto Lab

A comprehensive command-line tool for performing various cryptographic operations.

Features

  • AES-256-GCM - Symmetric encryption/decryption with authenticated encryption
  • ED25519 - Digital signature creation and verification
  • bcrypt - Password hashing with salt
  • Argon2 - Modern password hashing algorithm
  • SHA-256 - Data hashing and verification
  • ECDH - Elliptic Curve Diffie-Hellman key exchange

Installation

  1. Clone the repository:
git clone https://github.com/zalaghi-dev/crypto-lab.git
cd crypto-lab
  1. Install dependencies:
pnpm install
  1. Build the project:
pnpm run build

Usage

Interactive Mode

Run without parameters to enter interactive mode:

pnpm run dev:cli

The CLI will guide you through:

  1. Method selection (AES-256-GCM, ED25519, bcrypt, etc.)
  2. Operation selection (Encrypt/Decrypt, Sign/Verify, Hash/Verify)
  3. Data input
  4. Key/Password input

Command Line Arguments

You can also pass arguments directly:

pnpm run dev:cli [method] [operation] [text] [key]

Examples

AES-256-GCM Encryption

pnpm run dev:cli
# Choose: AES-256-GCM → Encrypt
# Input: "Hello World"
# Password: "mypassword"

ED25519 Digital Signature

pnpm run dev:cli
# Choose: ED25519 → Sign
# Input: "Important message"

Password Hashing with bcrypt

pnpm run dev:cli
# Choose: bcrypt → Hash
# Input: "mypassword"

Available Scripts

  • pnpm run build - Build the project
  • pnpm run dev:cli - Run CLI in development mode
  • pnpm run cli - Run CLI with built files
  • pnpm run lint - Run ESLint
  • pnpm run format - Format code with Prettier

Project Structure

src/
├── commands/           # CLI commands
├── services/          # Cryptographic services
├── questions/         # Interactive prompts
├── types/            # TypeScript type definitions
└── main.ts           # Application entry point

License

Unlicensed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors