Skip to content

Instantly share code, notes, and snippets.

View AshWilliams's full-sized avatar
:octocat:
Growth Mindset

Robert Rozas Navarro AshWilliams

:octocat:
Growth Mindset
View GitHub Profile
/*
* RC4 symmetric cipher encryption/decryption
*
* @license Public Domain
* @param string key - secret key for encryption/decryption
* @param string str - string to be encrypted/decrypted
* @return string
*/
function rc4(key, str) {
var s = [], j = 0, x, res = '';