@ilihub/caesar-cipher
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@ilihub/caesar-cipher

Typescript functions for performing Caesar Cipher encryption and decryption.

NPM Version NPM CodeFactor Socket Badge

Installation

# if you're using pnpm
pnpm add @ilihub/caesar-cipher

# or, if you're using npm
npm install @ilihub/caesar-cipher

# or, if you're using yarn
yarn add @ilihub/caesar-cipher

Usage

import { CaesarCipher } from "@ilihub/caesar-cipher";

const caesarCipher = new CaesarCipher();

const encrypted = caesarCipher.encrypt("Hello World", 3);
console.log(encrypted); // Khoor Zruog

const decrypted = caesarCipher.decrypt(encrypted, 3);
console.log(decrypted); // Hello World

const alldecrypted = caesarCipher.decryptAll(encrypted);
console.log(alldecrypted); // [ 'Hello World', 'Gdkkn Vnqkc', ... ]

Sponsors & Backers

Support the development of new open-source projects from ilihub through crowdfunding.

The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.

Sponsors


Package Sidebar

Install

npm i @ilihub/caesar-cipher

Homepage

ilihub.tech

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

6.75 kB

Total Files

5

Last publish

Collaborators

  • harshraj8843