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

f4st_crypt

v1.0.7

Published

A NodeJS text and files encryptor/decryptor.

Downloads

40

Readme

F4st_Crypt (or F4cry)

An NPM module (nodeJS) that uses crypto to encrypt/decrypt files and text in a robust way, that does not damage the file and also in small functions.

How to Use?

You can easily use this module in some simple functions:

Text

Text Encrypting

var f4cry = require("F4st_Crypt");
var ncryptxt = f4cry.encrypt("A foo and a bar", "My Password", null, null);
console.log(ncryptxt);

"null, null" is telling to the program to auto-generate the algorithm and iv processor.

And it will return like:

{
  type: 'encrypt',
  text: '9cbc314d4ebf883f581fa3e4192e2ed6',
  password: 'My Password',
  algorithm: 'aes-256-cbc',
  iv: 'e27294577aedb2b9ff62a84a9ed23ead'
}

Text Decrypting

var f4cry = require("F4st_Crypt");

var dcryptxt = f4cry.decrypt(ncryptxt.text, ncryptxt.password, ncryptxt.algorithm, ncryptxt.iv)
console.log(dcryptxt);

We are using encrypt text json response with "ncryptxt".

And it will return it like: A foo and a bar

Files

File Encrypting

Easily encrypt files with this function:

var f4cry = require("F4st_Crypt");
var ncrypt = f4cry.encryptFile("./test/test_file.rar", "./test/test_file_crypted.rar", "password", algorithm, iv_processor, (progress) =>{console.log(progress)});
    console.log(ncrypt)

It will return a json string like(useful for saving/using auto-generated IV processors):

{
  type: 'encrypt',
  from: './test/test_file.rar',
  to: './test/test_file_crypted.rar',
  password: 'senha',
  algorithm: 'aes-256-cbc',
  iv: 'f1562b6de15f7a228799bb906355c2e0'
}

File Decrypting

Easily decrypt files with this function:

var f4cry = require("F4st_Crypt");
var dcrypt = f4cry.decryptFile( "./test/test_file_crypted.rar",  "./test/test_file_decrypted.rar", ncrypt.password, ncrypt.algorithm, ncrypt.iv,(progress) =>{console.log(progress)})
    console.log(dcrypt)

It will return a json string too:

{
  type: 'decrypt',
  from: './test/test_file_crypted.rar',
  to: './test/test_file_decrypted.rar',
  password: 'senha',
  algorithm: 'aes-256-cbc',
  iv: 'f1562b6de15f7a228799bb906355c2e0'
}

Note

Supported Algorithms:

AES-128-CBC, AES-128-CBC-HMAC-SHA1, AES-128-CBC-HMAC-SHA256, AES-128-CFB, AES-128-CFB1, AES-128-CFB8, AES-128-CTR, AES-128-ECB, AES-128-OFB, AES-128-XTS, AES-192-CBC, AES-192-CFB, AES-192-CFB1, AES-192-CFB8, AES-192-CTR, AES-192-ECB, AES-192-OFB, AES-256-CBC, AES-256-CBC-HMAC-SHA1, AES-256-CBC-HMAC-SHA256, AES-256-CFB, AES-256-CFB1, AES-256-CFB8, AES-256-CTR, AES-256-ECB, AES-256-OFB, AES-256-XTS, AES128 => AES-128-CBC, AES192 => AES-192-CBC, AES256 => AES-256-CBC.

(We're also accepting improvements, don't be afraid, even if it's simple, make your commit!)