New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cipher-guard

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cipher-guard

CipherGuard: A robust npm package for effortless text encryption and decryption, ensuring the security of your sensitive data with ease.

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

Cipher Guard

Cipher Guard is a lightweight encryption and decryption library providing Caesar and XOR ciphers with Base64 encoding for added security. This package is designed to offer a simple and versatile solution for securing text-based data.

Installation

Install the package using npm:

npm install cipher-guard

Usage

const { encrypt, decrypt } = require("cipher-guard");

const encryptionKey = 24;
const salt = "abcd";

// Encryption
const encryptedText = encrypt("Hello World!", encryptionKey, salt);
console.log(encryptedText); // IgIEAwt5MQ4MBTx4PT89Ow==

// Decryption
const decryptedText = decrypt(encryptedText, encryptionKey, salt);
console.log(decryptedText); // Hello World!

Functions

encrypt(text, key, salt)

  • text : string
  • key : number (0 - 127)
  • salt : string

Returns an encrypted string.

decrypt(text, key, salt)

  • text : string
  • key : number (0 - 127)
  • salt : string

Returns a decrypted string.

Keywords

cipherguard

FAQs

Package last updated on 19 Jan 2024

Did you know?

Socket

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.

Install

Related posts