public void ShouldBeAbleToEncryptAndDecryptWithSecureSession() { InitializeSecureChannelSchema(); SecureSession testObject = SecureSession.Get(new ServiceProxyTestHelpers.FormUrlEncodedTestRequest(), A.Fake <IResponse>()); string data = "Monkey"; string cipher = testObject.EncryptWithPublicKey(data); string decrypted = testObject.DecryptWithPrivateKey(cipher); Expect.AreEqual(data, decrypted); }
public void Securesession_ShouldBeAbleToEncryptAndDecryptWithSecureSession() { SecureChannelConfig config = new SecureChannelConfig(); Exception ex; config.SchemaInitializer.Initialize(new ConsoleLogger(), out ex); Expect.IsNull(ex); SecureSession testObject = SecureSession.Get(new ServiceProxyTestHelpers.FormUrlEncodedTestRequest(), A.Fake <IResponse>()); string data = "Monkey"; string cipher = testObject.EncryptWithPublicKey(data); string decrypted = testObject.DecryptWithPrivateKey(cipher); Expect.AreEqual(data, decrypted); }