npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

encrypt-me

v1.0.0

Published

Contains function for encryption and decryption using techniques

Downloads

9

Readme

Encrypt-Me

Abbr:

PT - Plain Text
CT - Cipher Text
Ek - Encryption Function
Dk - Decryption Function
k - Key

Encryption and Decryption

CT = Ek(PT)
PT = Dk(CT)

1. Mono Alphabetic Cipher -

A monoalphabetic cipher is any cipher in which the letters of the plain text are mapped to cipher text letters based on a single alphabetic key. One to One Mapping

  • Additional Cipher

src/additional-cipher.js

Functions:

encrypt(plain,key):cipher
CT = (PT + k) mod 26
decrypt(cipher,key):plain
PT = (CT - k) mod 26

Requirements:

Key must have additional inverse

Key Domain : [0-25] ie 26

k - 26 keys only
including zero as key in that case we will have
same plain and cipher text
  • Multiplication Cipher

src/multiplication-cipher.js

Functions:

encrypt(plain,key):cipher
CT = (PT x k) mod 26
decrypt(cipher,key):plain
PT = (CT x inv(k)) mod 26

Requirements:

k x inv(k) mod 26 = 1
Key inverse must exists

Key Domain : 12

k - 12 Keys only with Key inverse
including one as key in that case we will have
same plain and cipher text

3. Affine Cipher

src/multiplication-cipher.js

Functions:

encrypt(plain, key: {kadd, kmul}):cipher
CT = ((PT x kmul) + kadd) mod 26

decrypt(cipher, key: {kadd, kmul}):plain
PT = ((CT - kadd) x inv(kmul)) mod 26

Requirements:

kadd - Additional Cipher Key
kmul - Multiplication Cipher Key
kmul x inv(kmul) mod 26 = 1
Key inverse must exists

Key Domain : 26 x 12 = 312

kadd - 26 values
kmul - 12 values

4. Monoalphabetic Cipher

src/monoalphabetic-cipher.js

Functions:

encrypt(plain, key):cipher
CT = key[PT]

decrypt(cipher, key):plain
PT = inv(key)[CT]

Requirements:

key - Key of length 26 containing all the alphabetic only once
ie It is mapping of between plain characters and cipher characters

Key Domain : 26!

Quite large key domain, so brute force attack is not feasible.

5. Autokey Cipher

src/autokey-cipher.js

Functions:

encrypt(plain, primer): cipher
CT(i) = (PT(i) + key(i)) mod 26

decrypt(cipher, primer): plain
PT(i) = (CT(i) - key(i)) mod 26

Requirements:

key - Key is any alphabetic character.
Encryption - New Key is generated by primer at its initial and merging the plain text stream. 
Decryption - New Key is generated by primer at its initial and from tabula rectat stream continues. 

Key Domain : Depends upon primer size n ^ size of primer

Since only initial primer is to guessed.

5. Playfair Cipher

src/playfair-cipher.js

Functions:

encrypt(plain, primer): cipher
CT(i) = (PT(i) + key(i)) mod 26

decrypt(cipher, primer): plain
PT(i) = (CT(i) - key(i)) mod 26

Requirements:

key - Key is any alphabetic character.
Encryption - New Key is generated by primer at its initial and merging the plain text stream. 
Decryption - New Key is generated by primer at its initial and from tabula rectat stream continues. 

Key Domain : Depends upon primer size n ^ size of primer

Since only initial primer is to guessed.