New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

codelockr

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codelockr

codelockr: A Versatile JavaScript/Typescript Cryptography Library

latest
Source
npmnpm
Version
1.0.14
Version published
Weekly downloads
15
1400%
Maintainers
1
Weekly downloads
 
Created
Source

codelockr: A Versatile JavaScript/Typescript Cryptography Library

This JavaScript/Typescript library, codelockr, empowers you to explore and implement a wide range of classical ciphers directly within your web applications. It provides user-friendly functions for various encryption and decryption techniques, making it an ideal tool for:

  • Educational purposes: Learn about classical ciphers and how they work.
  • Cryptography enthusiasts: Experiment with different ciphers and their functionalities.
  • Developers: Integrate basic encryption functionalities into your projects.

Installation

To install codelockr in your project, use either npm or yarn:

npm install codelockr

or

yarn add codelockr

Available Ciphers

codelockr offers a rich set of cipher implementations, each with its own encryption methods. Here's a table outlining the supported ciphers and how to use them:

CipherDescriptionImport StatementEncryption Method
Caesar CipherShifts plaintext letters by a specified number of positions.`import { CaesarCipher } from 'codelockr';``CaesarCipher(plaintext, shift)`
Rail Fence CipherEncrypts by writing across a specified number of rows (rails) and reading down.`import { RailFenceCipher } from 'codelockr';``RailFenceCipher(plaintext, rails)`
Substitution CipherReplaces plaintext letters with a custom mapping defined in a substitution key.`import { SubstitutionCipher } from 'codelockr';``SubstitutionCipher(plaintext, substitutionKey)`
Atbash CipherReverses the alphabet (A maps to Z, B maps to Y, etc.).`import { AtbashCipher } from 'codelockr';``AtbashCipher(plaintext)`
Beaufort CipherCombines Caesar ciphers with a keyword for a more complex encryption.`import { BeaufortCipher } from 'codelockr';``BeaufortCipher(plaintext, keyword)`
Autokey CipherUses the plaintext itself as a keystream, where each letter's shift is based on the previous ciphertext letter.`import { AutokeyCipher } from 'codelockr';``AutokeyCipher(plaintext, keyword)`
Columnar TranspositionRearranges letters based on a permutation order defined in a key.`import { ColumnarTranspositionCipher } from 'codelockr';``ColumnarTranspositionCipher(plaintext, columnarTranspositionKey)`
Vigenere CipherUses a repeating keyword to shift letters by varying amounts.`import { VigenereCipher } from 'codelockr';``VigenereCipher(plaintext, keyword)`
Playfair CipherCreates a bigram square based on a key and encrypts letter pairs.`import { PlayfairCipher } from 'codelockr';``PlayfairCipher(plaintext, keyword)`
Polybius Square CipherAssigns numbers (1-25) to letters in a 5x5 grid for encryption/decryption.`import { PolybiusSquareCipher } from 'codelockr';``PolybiusSquareCipher(plaintext)`

Keywords

javascript

FAQs

Package last updated on 23 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts