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 🙏

© 2024 – Pkg Stats / Ryan Hefner

necdetiye-crypto

v1.0.0

Published

This is a light liblary for encrypting or hashing texts without any dependency.

Downloads

5

Readme

This is a small library for encrypting or hashing texts without any dependency.

Encryption Module

It has 2 modules, and the first and main one is encryption.js. This module includes 8 functions named as: encrypt1, decrypt1, encrypt2, decrypt2, etc. All of them use different character encodings to encrypt texts but work the same way.

They have a simple and similar syntax:

let encrypted1 = encrypt1("this is a sample text", "this is a sample key");
let encrypted2 = encrypt2("this is a sample text", "this is a sample key");
let encrypted3 = encrypt3("this is a sample text", "this is a sample key");
let encrypted4 = encrypt4("this is a sample text", "this is a sample key");

this variables returns the crypted gibberish string.

The decryption functions also have same synthax:

let decrypted1 = decrypt1(encrypted1, "this is a sample key");
let decrypted2 = decrypt2(encrypted2, "this is a sample key");
let decrypted3 = decrypt3(encrypted3, "this is a sample key");
let decrypted4 = decrypt4(encrypted4, "this is a sample key");

The first parameter is have to be text. It can have unlimited range of characters.

The second parameter could be an string, number or boolean.

Here is the limitations and points you should be aware of:

If the Second Parameter, which is key;

if it's a string, it can have only 200 characters inside. Also if you were type "true" or "false" as a string, they'll be converted to boolean, which means your second argument will take "true" or "false" value as a boolean.

if it's a number, it can't be bigger than 64.000.

if it's a boolean and it's true, that means there is no encryption occur when you invoke encrypt functions, only thing that happen is you change the encodings of the character, which far more easier to configure out to find your key. Also be aware of, if you invoke "encrypt3()" function and passing no argument or "0" as number or "true" as string or boolean the encoding change neither happen.

if it's a boolean and it's false, that means the key will take random value. That basically means it's can not be decrypted easily. You have try 64.000 times to decrypt it, which stands all numeric values you can pass as second argument.

Hash Module:

The second module is "hash.js" module and it has 3 functions, which is "hash30(), hash60(), hash90()". They generate new hashed string which has 30, 60 or 90 characters and lost it's original value.

Warning!

Because of that, you should be aware of. If security is not your main goal, if you have to convert to older value of a text in some situations, then you shouldn't use it! If your client want to secure their password by the way that even you wouldn't figure out it's real value, then use it.

They also have same synthax:

let hashedText1 = hash30("this is a sample text");
let hashedText2 = hash60("this is a sample text");
let hashedText3 = hash90("this is a sample text");

This returns same text for same input and lose it's original value.