Javascript based cipher encrypter/decrypter