public void encrypt() { string[] ss = { "12345abcd", "", "%!@*\"#$^@!" }; foreach (string s in ss) { string result = VistaUtils.encrypt(s); Assert.IsNotNull(result); Assert.AreNotEqual(result, s); Assert.AreEqual(result.Length, s.Length + 2); } }
public override MdoQuery buildVisitRequest() { VistaQuery vq = new VistaQuery("XUS SIGNON SETUP"); string token = SSTCryptographer.Encrypt(creds.AuthenticationToken, VistaConstants.ENCRYPTION_KEY); token = UserValidationDao.escapeString(token); string arg = "-35^" + VistaUtils.encrypt(creds.SecurityPhrase + '^' + token); vq.addParameter(vq.LITERAL, arg); return(vq); }
public void encrypt_null() { VistaUtils.encrypt(null); }