Пример #1
0
 public void TestCreateCert()
 {
     CertificateHelper.InvokeWithDummyCert(
         (fingerprint) =>
     {
         using (var store = new CertificateStore(fingerprint))
         {
             Assert.IsNotNull(store.FingerPrint);
             Assert.AreEqual(fingerprint, store.FingerPrint);
         }
     });
 }
Пример #2
0
        public void TestRoundTripeEmpty()
        {
            const string TestString = "";

            CertificateHelper.InvokeWithDummyCert(
                (fingerprint) =>
            {
                var encrypted = DataTransform.Encrypt(fingerprint, TestString);
                var decrypted = DataTransform.Decrypt(encrypted);

                Assert.AreEqual(decrypted, TestString);
            });
        }
Пример #3
0
        public void TestRoundTrip2()
        {
            const string TestString =
                "asdfasdfas;dlffkjpowQYB93YRY7982UO1HQW AHAUI FACPWUH F CAHGUIWEA RY93QRCHWEFCS;DHFVOAWGOSE7R HAE";

            CertificateHelper.InvokeWithDummyCert(
                (fingerprint) =>
            {
                var encrypted = DataTransform.Encrypt(fingerprint, TestString);
                var decrypted = DataTransform.Decrypt(encrypted);

                Assert.AreEqual(decrypted, TestString);
            });
        }