mirror of
https://github.com/khalidbelk/lib-vigenere.git
synced 2026-06-21 03:12:39 +02:00
Vigenère cipher implementation in TypeScript
- TypeScript 100%
| .github/workflows | ||
| src | ||
| test | ||
| .gitignore | ||
| bun.lockb | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
@uniiem/vigenere-cipher
Vigenère cipher implementation in TypeScript
Installation
npm install @uniiem/vigenere-cipher
Usage
import { encrypt, decrypt } from '@uniiem/vigenere-cipher';
const key = 'OFCPGD';
const plaintext = 'CTFEVER @ VIGENERE CIPHER TEST';
const ciphertext = encrypt(plaintext, key);
console.log(ciphertext); // 'QYHTBHF @ AKVKQSWG ROSVJT IKVH'
const decrypted = decrypt(ciphertext, key);
console.log(decrypted); // 'CTFEVER @ VIGENERE CIPHER TEST'
Sponsor
Buy me a coffee~