
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
encrypt-decrypt-library
Advanced tools
Simple Encryption Library for encrypting strings and integers into unique tokens, safe for use in URL paths and queries. Supports 64bit signed and unsigned big endians.
// Via NPM
$ npm install --save encrypt-decrypt-library
// Via Yarn
$ yarn add encrypt-decrypt-library
import Encryption from "encrypt-decrypt-library";
const config = {
algorithm: process.env.ALGORITHM,
encryptionKey: process.env.ENCRYPTION_KEY,
salt: process.env.SALT,
}
const encryption = new Encryption(config);
encryption.encrypt('Hello world')
// xxxxxxx
The library requires the following configuration options:
algorithm: String - The algorithm type to be used by the library
encryptionKey: String - The encryption key to be used by the library
salt: String - The salt to be used by the library
Returns an encrypted value.
Type: string -
The value that will be encrypted.
Type: boolean (optional) -
The type of value. Provides support for Big Integer encryption.
import Encryption from "encrypt-decrypt-library";
const config = {
algorithm: process.env.ALGORITHM,
encryptionKey: process.env.ENCRYPTION_KEY,
salt: process.env.SALT,
}
const encryption = new Encryption(config);
// Encrypted as a string
encryption.encrypt('Hello world')
// Encrypted as a string
encryption.encrypt('1234567890')
// Encrypted as an unsigned 64-bit Integer
encryption.encrypt(123, true)
Returns a decrypted value.
Type: string -
The token that will be decrypted.
Type: boolean (optional) -
The type of encrypted value if known. Provides support for decrypting small and big integers.
import Encryption from "encrypt-decrypt-library";
const config = {
algorithm: process.env.ALGORITHM,
encryptionKey: process.env.ENCRYPTION_KEY,
salt: process.env.SALT,
}
const encryption = new Encryption(config);
// Encoded as string
encryption.decrypt('gmmBh17Q4QA=')
// xxx
// Encoded as an integer
encryption.decrypt('NF1r855MimY=', true)
// xxx
Release management is automated using semantic-release.
FAQs
Encryption Library
The npm package encrypt-decrypt-library receives a total of 20 weekly downloads. As such, encrypt-decrypt-library popularity was classified as not popular.
We found that encrypt-decrypt-library 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.