public void TestSignAndTryVerifyMessageBad(String subDir, string nestDir)
        {
            var subPath = Util.TestDataPath(TEST_DATA, subDir, nestDir);
            using (var signer = new AttachedSigner(subPath))
            using (var verifier = new AttachedVerifier(subPath))
            {
                var signedoutput = signer.Sign(input);
                byte[] verifiedOutput;
                byte[] verifiedOutput2;
                var badoutput = signedoutput.ToBytes();
                badoutput[10] ^= 9;

                Expect(signer.TryGetVerifiedMessage(badoutput, out verifiedOutput), Is.False);

                Expect(verifier.TryGetVerifiedMessage(badoutput, out verifiedOutput2), Is.False);
            }
        }
        public void TestSignAndTryVerifyMessageBad(String subDir, string nestDir)
        {
            var subPath = Util.TestDataPath(TEST_DATA, subDir, nestDir);

            using (var signer = new AttachedSigner(subPath))
                using (var verifier = new AttachedVerifier(subPath))
                {
                    var    signedoutput = signer.Sign(input);
                    byte[] verifiedOutput;
                    byte[] verifiedOutput2;
                    var    badoutput = signedoutput.ToBytes();
                    badoutput[10] ^= 9;

                    Expect(signer.TryGetVerifiedMessage(badoutput, out verifiedOutput), Is.False);

                    Expect(verifier.TryGetVerifiedMessage(badoutput, out verifiedOutput2), Is.False);
                }
        }
        public void TestSignAndTryVerifyMessage(String subDir, string nestDir)
        {
            var subPath = Util.TestDataPath(TEST_DATA, subDir, nestDir);
            using (var signer = new AttachedSigner(subPath))
            using (var verifier = new AttachedVerifier(subPath))
            {
                var signedoutput = signer.Sign(input);
                string verifiedOutput;
                string verifiedOutput2;

                Expect(signer.TryGetVerifiedMessage(signedoutput, out verifiedOutput), Is.True);

                Expect(verifier.TryGetVerifiedMessage(signedoutput, out verifiedOutput2), Is.True);

                Expect(verifiedOutput, Is.EqualTo(input));

                Expect(verifiedOutput2, Is.EqualTo(input));
            }
        }
        public void TestSignAndTryVerifyMessage(String subDir, string nestDir)
        {
            var subPath = Util.TestDataPath(TEST_DATA, subDir, nestDir);

            using (var signer = new AttachedSigner(subPath))
                using (var verifier = new AttachedVerifier(subPath))
                {
                    var    signedoutput = signer.Sign(input);
                    string verifiedOutput;
                    string verifiedOutput2;

                    Expect(signer.TryGetVerifiedMessage(signedoutput, out verifiedOutput), Is.True);

                    Expect(verifier.TryGetVerifiedMessage(signedoutput, out verifiedOutput2), Is.True);

                    Expect(verifiedOutput, Is.EqualTo(input));

                    Expect(verifiedOutput2, Is.EqualTo(input));
                }
        }