public void TestEncryptDecryptString() { string svalue = TEST_PASSWORD; string esbyuser = Encryptor.Encrypt(svalue); Assert.AreNotEqual(svalue, esbyuser); Assert.AreEqual(svalue, Encryptor.Decrypt(esbyuser)); }
public string SetToken(long userId, string token) { this.Token = _encryptDecrypt.Encrypt(string.Format("{0}:{1}", userId, token)); return(this.Token); }