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

encrypt-char

v1.0.2

Published

High performance encryption and decryption tool.

Downloads

10

Readme

Features

  • Zero dependencies.
  • Works with any NodeJs projects.
  • High performance and security.
  • Simple usage.

Install

Install with NPM or YARN:

$ npm i encrypt-char

or

$ yarn add encrypt-char

Methods

Generate a New Keychar

encryptChar.generateKey(salt, password)

import { encryptChar } from 'encrypt-char';

const mySalt = 6;
const mySecretPassword = 'secretPassword1234';

const myKeychar = encryptChar.generateKey(mySalt, mySecretPassword);

// return BEGIN KEY ---34230LPRYjLw0kaNhXUtNmdk0juT0278W756LH9MNox2....--- END KEY

Hard Encode Data

encryptChar.hardEncode(data, keychar, password)

import { encryptChar } from 'encrypt-char';

const mySecretPassword = 'secretPassword1234';
const myText = 'Lorem ipsum dolor sit amet. 1234567890 !@#$%^&*()_+';

const resultEncode = encryptChar.hardEncode(
  myText,
  myKeychar,
  mySecretPassword
);

// return 'hYjIzzH1Mjw1no7CeoA5Flnb3VQR6PKC4VmxZJLC9s2leCGv0NLxe9fdQUmDe9fx6NLA'

Hard Decode Data

encryptChar.hardDecode(encodedData, keychar, password)

import { encryptChar } from 'encrypt-char';

const mySecretPassword = 'secretPassword1234';
const myEncodedText =
  'hYjIzzH1Mjw1no7CeoA5Flnb3VQR6PKC4VmxZJLC9s2leCGv0NLxe9fdQUmDe9fx6NLA';

const resultDecode = encryptChar.hardDecode(
  myEncodedText,
  myKeychar,
  mySecretPassword
);

// return 'Lorem ipsum dolor sit amet. 1234567890 !@#$%^&*()_+'

Soft Encode Data

encryptChar.softEncode(data)
import { encryptChar } from 'encrypt-char';

const myText = 'Lorem ipsum dolor sit amet. 1234567890 !@#$%^&*()_+';

const resultEncode = encryptChar.softEncode(myText);

// return 'r8VKooiJeVCJjAUIgATO4cjN1QzMyEDIuQXZtFGI0l2cgI3bs9GZg0WdzBXag0WZy9GT'

Soft Decode Data

encryptChar.softDecode(encodedData)

import { encryptChar } from 'encrypt-char';

const myEncodedText =
  'r8VKooiJeVCJjAUIgATO4cjN1QzMyEDIuQXZtFGI0l2cgI3bs9GZg0WdzBXag0WZy9GT';

const resultDecode = encryptChar.softDecode(myEncodedText);

// return 'Lorem ipsum dolor sit amet. 1234567890 !@#$%^&*()_+'

Parameters

encryptChar.generateKey(salt: number, password: string)

The "salt" to increase the encoding complexity. The "password" to sign and validate keychar.

encryptChar.hardEncode(data: string, keychar: string, password: string)

The "data" text to encode. The "keychar" generated to encode text. The "password" to sign and validate keychar.

encryptChar.hardDecode(encodedData: string, keychar: string, password: string)

The "encodedData" text previously encoded. The "keychar" generated to decode text. The "password" to sign and validate keychar.

encryptChar.softEncode(data: string)

The "data" text to encode.

encryptChar.softDecode(encodedData: string)

The "encodedData" text previously encoded.

Recomendations

Store the generated "keychar" and "password" in a safe place!

The "keychar" is a unique key that guarantees encoding and decoding using only in "hardEncode" and "hardDecode" methods. Losing the "keychar" or "password" makes it impossible to reverse any encoded text.

Autor

| @anselmodev | | :--------------------------------------------------------------------------------------------------------------------------------: |