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

gamacrypt

v1.0.1

Published

An npm library for encryption, decryption and compression of string and byte data. Encryption and Decryption are done in AES

Downloads

2

Readme

GAMACRYPT USAGE:

Encrypting text:

When encrypting text using the gamacrypt library, simply import the encryptAES function and use as shown below:

const gamacrypt = require('gamacrypt')

const encryptedText = gamacrypt.encryptAES('Enter Text to encrypt', encryption_key)

console.log(encryptedText)

or


const {encryptAES} = require('gamacrypt')

const encryptedText = encryptAES('Enter Text to encrypt', encryption_key)

console.log(encryptedText)

Decrypting text:

When decrypting text using the gamacrypt library, simply import the decryptAES function and use as shown below:

const gamacrypt = require('gamacrypt')

const decryptedText = gamacrypt.decryptAES('Enter cipher text', encryption_key)

console.log(decryptedText)

or


const {decryptAES} = require('gamacrypt')

const decryptedText = decryptAES('Enter cipher text', encryption_key)

console.log(decryptedText)

Compressing and Decompressing Data Streams

In order to compress or decompress data streams use the compress and decompress functions.


const { compress, decompress } = require('gamacrypt/compress/compress')

const read = createReadStream(source)
const write = createWriteStream(destination)

compress(read, write)

// OR

decompress(read, write)

It can also be used in various situations like http streams in servers. Example:


const { compress, decompress } = require('gamacrypt/compress/compress')

app.get('/', (req, res) => {
    const read = createReadStream(source)

    compress(read, res)

    // OR

    decompress(read, res)
})

Encrypting and Decrypting Data Streams

In order to encrypt or decrypt data streams. use the initialize an object from the AES class and use the encryptStream and decryptStream methods. Example:


const AES = require('gamacrypt/encryptions/AES/AES')

const cryptObj = new AES(encryption_key)

const read = createReadStream(source)
const write = createWriteStream(destination)

read.pipe(cryptObj.encryptStream()).pipe(write)

// OR

read.pipe(cryptObj.decryptStream()).pipe(write)

Same as above, It can also be used in various situations like http streams in servers. Example:


const AES = require('gamacrypt/encryptions/AES/AES')
const cryptObj = new AES(encryption_key)

app.get('/', (req, res) => {
    const read = createReadStream(source)

    read.pipe(cryptObj.encryptStream()).pipe(res)

    // OR

    read.pipe(cryptObj.decryptStream()).pipe(res)

})

Encrypting , Decrypyting, Compressing and Decompressing at the same time

In order to encrypt and compress a data stream or to decrypt and decompress a data stream use the gamacryptAES and degamacryptAES functions respectively


const  {gamacryptAES, degamacryptAES} = require('gamacrypt')

const read = createReadStream(source)
const write = createWriteStream(destination)

gamacryptAES(read, write)

// OR

degamacryptAES(read, write)

Same as above, It can also be used in various situations like http streams in servers. Example:


const { gamacryptAES, degamacryptAES } = require('gamacrypt')

app.get('/', (req, res) => {
    const read = createReadStream(source)

    gamacryptAES(read, res)

    // OR

    degamacryptAES(read, res)
})

New features will be added later