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

d-encode-decode

v1.0.4

Published

Encode and Decode String Uniquely, Every Encryption is different and Unique

Downloads

5

Readme

d-encode-decode

Simple way to create Encoded Text and Decoded Text. but why d-encode-decode? its Simple. It Generate Unique Text for every encode and you can decode all unique encoded text and getting same output. also if you want to add expire time for decoding that you can do too.

Installation

Use the package manager npm to install d-encode-decode.

npm install d-encode-decode

Basic usage

const d=require('d-encode-decode')

# returns '580d5a595a505a505a084d4d4a4a4d4d5c515c515d0d5c0b5c0f'
d.encode('hello')

# Everytime you encode same string and get different unique encoded value
# for "Hello" It returns
# 595e5b085b5a5b5a5b594d4d4a4a4d4d5c0c5d0d5c0d5c0a
# 5b5d595059595959595a4d4d4a4a4d4d5c515d0d5c0d5c0b
# 5b58590a595c595c595f4d4d4a4a4d4d5c0b5c0a5d0d5c515c51

# returns 'Hello'
d.decode('595e5b085b5a5b5a5b594d4d4a4a4d4d5c0c5d0d5c0d5c0a')
d.decode('5b5d595059595959595a4d4d4a4a4d4d5c515d0d5c0d5c0b')
d.decode('5b58590a595c595c595f4d4d4a4a4d4d5c0b5c0a5d0d5c515c51')

Use Own Key for Encode

const d=require('d-encode-decode')

#Set Key for Encryption
d.key("your key");

# returns '500352555207520752064646414146465752570056545751'
d.encode('hello')

# Everytime you encode same string and get different unique encoded value
# for "Hello" It returns
# 500352555207520752064646414146465752570056545751
# 5104535053005300535a4646414146465703565457535757
# 535451005150515051534646414146465752575256545756

# returns 'Hello'
d.decode('500352555207520752064646414146465752570056545751')
d.decode('5104535053005300535a4646414146465703565457535757')
d.decode('535451005150515051534646414146465752575256545756')

Set Time Limit for decryption

const d=require('d-encode-decode')

#Set Key for Encryption (Optional)
d.key("your key");

# returns '500352555207520752064646414146465752570056545751'
d.encode('hello',20) //Time in seconds d.encode("String to encode","Time in Seconds")
# for above this key only valid for 20 seconds after that it returns 0

# Everytime you encode same string and get different unique encoded value
# for "Hello" It returns
# 411043444314431443115656515156564644464447444641461347444641464646454646464246464644464246464644474446414640
# 5f515d5c5d0a5d0a5d0f4d4d4a4a4d4d5c0d5c515d0d5c0d5c085d0d5c515c0f5c0a5c0f5c0b5c0f5c0d5c0b5c595c585d0d5c515c50
# 5c0c5e5a5e085e085e504d4d4a4a4d4d5c515c0f5d0d5c0f5d0d5c515c0f5c0a5c0f5c0b5c0f5c0d5c085c0b5c515d0d5c515c50

# returns 'Hello'
d.decode('411043444314431443115656515156564644464447444641461347444641464646454646464246464644464246464644474446414640')
d.decode('5f515d5c5d0a5d0a5d0f4d4d4a4a4d4d5c0d5c515d0d5c0d5c085d0d5c515c0f5c0a5c0f5c0b5c0f5c0d5c0b5c595c585d0d5c515c50')
d.decode('5c0c5e5a5e085e085e504d4d4a4a4d4d5c515c0f5d0d5c0f5d0d5c515c0f5c0a5c0f5c0b5c0f5c0d5c085c0b5c515d0d5c515c50')

Publisher

Dishant Kapoor

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT