diff --git a/lib/token.js b/lib/token.js
index <HASH>..<HASH> 100644
--- a/lib/token.js
+++ b/lib/token.js
@@ -15,15 +15,15 @@ exports.generate = function(name,password,expiry) {
 };
 
 exports.cipher = function(token) {
-	var cipher = crypto.createCipher('aes192', sessionKey);
-	token = cipher.update(token, 'utf8','hex');
-	token += cipher.final('hex');
+	var cipher = crypto.createCipher('rc4-hmac-md5', sessionKey);
+	token = cipher.update(token, 'utf8','base64');
+	token += cipher.final('base64');
 	return token;
 };
 
 exports.decipher = function(token){
-	var decipher = crypto.createDecipher('aes192', sessionKey);
-	token = decipher.update(token, 'hex','utf8');
+	var decipher = crypto.createDecipher('rc4-hmac-md5', sessionKey);
+	token = decipher.update(token, 'base64','utf8');
 	token += decipher.final('utf8');
 	return token;
 };
changed cipher algorithm and input/output format