public void DecryptStringToVerifySuccess() { string data; const string encrypted = "ORCbifIIPKs="; const string saltKey = "3GOx2WCt4tZefybWLJNcIH2vTbQWFJAF"; _hashing.DecryptString(encrypted, saltKey, out data); Debug.WriteLine("Data : {0}, Encrypted : {1}, SaltKey : {2}", data, encrypted, saltKey); bool verified = _hashing.VerifyEncryptionString(data, saltKey, encrypted); Assert.AreEqual(verified, true); }
public string Decrypt(string encryptedConnectionString) { if (encryptedConnectionString == null) { throw new ArgumentNullException("encryptedConnectionString"); } encryptedConnectionString = encryptedConnectionString.Replace(" ", "+"); string decryptedConnectionString; _hashing.DecryptString(encryptedConnectionString, SaltKey, out decryptedConnectionString); return(decryptedConnectionString); }