public void ValidatePasswordProtector() { string password = "******"; string encryptedpassword = IGenProtector.Encrypt(password); string decryptedPassword = IGenProtector.Decrypt(encryptedpassword); Assert.AreEqual(password, decryptedPassword); }
public bool Activate(string code) { string email = IGenProtector.Decrypt(code); bool isActive = false; if (!string.IsNullOrEmpty(email)) { isActive = ProcessFactory.GetLoginProcess().Activate(email); } return(isActive); }