SkillAgentSearch skills...

Majorca

Simple JavaScript string encryption

Install / Use

/learn @jackdalton/Majorca
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Majorca Build Status

This project should not be used for anything important. Use Node.js's built-in crypto module instead.

Majorca is a simple utility to encrypt and decrypt strings with a basic symmetric-key algorithm.

Encrypted strings are compressed using a LZ77 based compression algorithm in base62.

Majorca only compresses strings when necessary; if an encrypted string is shorter than its compressed equivalent, it's not compressed.

Example

To encrypt a string, create a new instance of Majorca:

let Majorca = require("majorca");
let key = 13 // a (large) prime number.
let instance = new Majorca(key);
instance.encrypt("test"); // returns "n1508?1313?1495?1508"
instance.decrypt("n1508?1313?1495?1508"); // returns "test"

This project has also been ported to Python here.

View on GitHub
GitHub Stars15
CategoryDevelopment
Updated6y ago
Forks0

Languages

JavaScript

Security Score

60/100

Audited on Jul 15, 2019

No findings