
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
A simple bi-directional salting and encryption system designed for securing authentication tokens.
A simple bi-directional salting and encryption system designed for securing authentication tokens.
"use strict";
const EasyCrypt = require("../EasyCrypt.js");
const ez = new EasyCrypt();
let stringToEncrypt = "This is easy.";
let crypted = ez.encrypt(stringToEncrypt);
console.log(`Crypted: ${crypted.content}`);
console.log(`Decrypted: ${ez.decrypt(crypted)}`);
npm install easycrypt
Main class, constructor has no arguments and returns a EasyCrypt object.
The encryption password is stored on an environment variable called EasyCryptPW.
You must set the environment variable before using EasyCrypt.
From the command line:
EasyCryptPW='3zTvzr3p67VC61jmV54rIYu1545x4TlY' node EasyCrypt.js
const EasyCrypt = require("../EasyCrypt.js");
const ez = new EasyCrypt();
Used to salt an encrypt a piece of text.
const EasyCrypt = require("../EasyCrypt.js");
const ez = new EasyCrypt(/\S+/g);
const text = ez.encrypt("Easy");
console.log(text);
/*
* { content: '5cc07dd95c919de9544ed4f1f5+H9StNlQK',
* tag: <Buffer 97 78 be 76 66 da 3c 71 ca fd 4e a0 07 d0 39 f8> }
*/
// This same object must be passed to decrypt, so store content and tag
Returns object with authorization buffer and encrypted content.
Used to salt an encrypt a piece of text.
const EasyCrypt = require("../EasyCrypt.js");
const ez = new EasyCrypt(/\S+/g);
const text = ez.encrypt("Easy");
console.log(ez.decrypt(text)); // Easy
Returns the original decrypted string.
To run mocha/chai tests.
npm run test
To run the main example.
npm run ex
EasyCrypt.js is released under the MIT license.
FAQs
A simple bi-directional salting and encryption system designed for securing authentication tokens.
The npm package easycrypt receives a total of 1 weekly downloads. As such, easycrypt popularity was classified as not popular.
We found that easycrypt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.