
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@perion/crypto
Advanced tools
@perion/crypto
A library for encrypting/decrypting MapleStory packets.
npm i --save @perion/crypto
const crypto = require('@perion/crypto');
/** Example data */
const payload = Buffer.from([0x1]);
const sendIv = Buffer.from([0x0, 0x2, 0x3, 0x4]);
const recvIv = Buffer.from([0x4, 0x2, 0x1, 0x0]);
/** crypto.Shanda example */
const encrypted = crypto.Shanda.encrypt(payload);
const decrypted = crypto.Shanda.decrypt(payload);
/** Returns the input buffer with the payload encrypted/decrypted using Maple Custom Shanda */
/** crypto.AES example */
/**
* You must initialize the AES class with:
* - an IV (Initialization Vector)
* - a MapleStory version number
*
* The IV must have a length of 4
* As the server, you must send the IV for both send and recv to the client
*/
const sendAES = new crypto.AES(sendIv, 83);
const recvAES = new crypto.AES(recvIv, 83);
const encryptedOut = sendAES.transform(payload);
const decryptedIn = recvAES.transform(payload);
/** Returns the input buffer with the payload encrypted/decryped using Maple AES */
FAQs
Exports the cryptography functions needed for MapleStory
The npm package @perion/crypto receives a total of 27 weekly downloads. As such, @perion/crypto popularity was classified as not popular.
We found that @perion/crypto 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.