Skip to content

Instantly share code, notes, and snippets.

View acuna-public's full-sized avatar
🎯
Focusing

Anton Tikhomirov acuna-public

🎯
Focusing
View GitHub Profile
@farhadi
farhadi / rc4.js
Created March 24, 2012 17:09
RC4 encryption in javascript and php
/*
* 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 = '';