jsencrypt-ext
TypeScript icon, indicating that this package has built-in type declarations

2.1.2 • Public • Published

Introduction

jsencrypt is a popular RSA Javascript encryption library, but it does not support to encryt/decrypt long message. Although RSA is not recommended to encrypt long plaintext, there are still many business scenes to achieve it. I have extended the lib, based on jsencrypt.

How to use

import JSEncrypt from "jsencrypt-ext";

const encryptInstance = new JSEncrypt();
encryptInstance.setPublicKey("publicKey");

const ciphertext = encryptInstance.encrypt("long plaintext");

const decryptInstance = new JSEncrypt();
decryptInstance.setPrivateKey("privateKey");

const plaintext = decryptInstance.decrypt("ciphertext");

Package Sidebar

Install

npm i jsencrypt-ext

Weekly Downloads

19

Version

2.1.2

License

MIT

Unpacked Size

240 kB

Total Files

8

Last publish

Collaborators

  • bartlian