public void EncryptedDataShouldBeRoundtripped()
        {
            const string secretUser = "******";
            const string secretPass = "******";
            string path;

            using (Utility.WithEmptyDirectory(out path))
            {
                using (var fixture = new TEncryptedBlobCache(path))
                {
                    fixture.SaveLogin(secretUser, secretPass, "github.com").First();
                }

                using (var fixture = new TEncryptedBlobCache(path))
                {
                    var loginInfo = fixture.GetLoginAsync("github.com").First();
                    Assert.Equal(secretUser, loginInfo.UserName);
                    Assert.Equal(secretPass, loginInfo.Password);
                }
            }
        }
Ejemplo n.º 2
0
        public void EncryptedDataShouldBeRoundtripped()
        {
            const string secretUser = "******";
            const string secretPass = "******";
            string       path;

            using (Utility.WithEmptyDirectory(out path))
            {
                using (var fixture = new TEncryptedBlobCache(path))
                {
                    fixture.SaveLogin(secretUser, secretPass, "github.com").First();
                }

                using (var fixture = new TEncryptedBlobCache(path))
                {
                    var loginInfo = fixture.GetLoginAsync("github.com").First();
                    Assert.Equal(secretUser, loginInfo.UserName);
                    Assert.Equal(secretPass, loginInfo.Password);
                }
            }
        }