zest-encryption

1.0.14 • Public • Published

Zest 🔐

https://nodei.co/npm/zest-encryption.png?mini=true Known Vulnerabilities npm downloads npm version GitHub hits

Sophisticated hybrid encryption leveraging the power of RSA and AES technologies.

Introduction

Zest is a hybrid encryption library, developed by the team at Moniker (github.com/mnkrcc), to simplify encryption for developers by abstracting away complicated methods.

Features

  • Hybrid Encryption: Seamlessly combines the strengths of RSA and AES encryption algorithms to deliver a robust and secure encryption solution.
  • Effortless Key Management: Automates key generation, export, and import, making key management a hassle-free process.
  • Zero Additional Dependencies: Leverages native NodeJS packages, eliminating the necessity for any external dependencies.

Example Usage

const zest = require("zest-encryption");
// or (ESM)
import zest from 'zest-encryption';

const fs = require("fs");

// Encryption / decryption demo
const key = new zest.EncryptionKey();

key.createKey();

const encryptedMessage = key.encrypt("Hello, World!");
const decryptedMessage = key.decrypt(encryptedMessage);

if (decryptedMessage === "Hello, World!") {
    console.log("Encryption and decryption successful!");
}

// Key export / import demo
fs.writeFileSync(".key", key.export());

const importedKey = new zest.EncryptionKey(fs.readFileSync(".key").toString());
// or
const manuallyImportedKey = new zest.EncryptionKey();

manuallyImportedKey.import(fs.readFileSync(".key").toString());

Notes

  • Default Key Generation: A new encryption key is automatically generated whenever a new instance of zest.EncryptionKey is instantiated. This implies that invoking key.createKey() is not mandatory.
  • RSA Modulus Length: The default RSA modulus length is 2048 bits. However, this can be customized by invoking the key.createKey() method.

License

Zest is released under the MIT license. For more information, please refer to the license file in the repository.

Links

Contributors ✨

Thanks goes to these wonderful people (emoji key):

David
David

📖
mjk134
mjk134

📓
VihangaTheTurtle
VihangaTheTurtle

💻
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!

Package Sidebar

Install

npm i zest-encryption

Weekly Downloads

14

Version

1.0.14

License

MIT

Unpacked Size

26 kB

Total Files

8

Last publish

Collaborators

  • turtleee