My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

This is ARC4 (Alleged RC4) written in Javascript for handling unicode string with cached key. During the encryption process, a secret message (Unicode string, in any language) is processed and a string represented by hexadecimal numbers is generated as output. During the decryption process, the string represented by hexadecimal required to reveal the original string.

Update

  • Version r4 has been launched already.

Features

  • Written in Javascript: You can use it as server side as well as client side tools.
  • Cached key: You're not required to specify the key in subsequent call once you've specified within the same page. Initialized key array will be cached to speed up subsequent use.
  • Use the Alleged RC4 stream cipher.
  • Use Unicode: no extra module need to process string before conversion.
  • Only 756 bytes in length. It can be easily implemented into other projects.
  • Add init function for initialize the array before operation. (useful for repetitive encryption)
  • There are three method mod: "encryption", "decryption" and "init"

Usage

  • Encryption: arc4({msg:"Secret Message",method:"encryption",key:"Specify your secret key"})
  • the result for the operation above should be "34f38721a430d1844c7af4869f39e7e9db23df47348a62d86bb50325"
  • In subsequent encryption, key is no longer needed: arc4({msg:"Secret Message",method:"encryption"})
  • Decryption: arc4({msg:"34f38721a430d1844c7af4869f39e7e9db23df47348a62d86bb50325",method:"decryption",key:"Specify your secret key"})
  • the result for the operation above should be "Secret Message"
  • once the key has been specified in encryption/decryption process, key is no longer needed: arc4({msg:"Secret Message",method:"decryption"})

Powered by Google Project Hosting