Skip to content

tony41780/JQueryRC4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JQueryRC4: RC4 Encryption Library

Version: 1.0.0

Light weight (<3kb) reversible encryption library for JQuery.

Recommendations

Limit encryption usage to OTP or include a nonce with the key to prevent known security vulnerability of RC4 (same as WEP).

Options

key: null
method: "encrypt"

Usage

Decrypt all element text for class using key "ThisIsAGreatKey"

$(".EncryptedText").rc4({"key":"ThisIsAGreatKey","method":"decrypt"});

Encrypt all input value for class using key "ThisIsAGreatKey"

$(".SecureInput").rc4({"key":"ThisIsAGreatKey"});  //encrypting is the default method

Encrypt a string and store to variable

var jsonMSG = {"to":"johndoe@fakeemail.com","msg": $.rc4Encrypt($('#plainTextInput').val(),$('#key').val())};

Notes

Tested with UTF-8 encoding

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published