public void TestVerifyTimestampUsingConfiguration()
        {
            byte[] data = Encoding.UTF8.GetBytes(dataToTimestamp);

            TimestampCreator creator   = new TimestampCreator();
            TimestampObject  timestamp = creator
                                         .SetDataForTimestamping(data)
                                         .CreateTimestamp();

            Assert.AreEqual(HashAlgorithm.SHA1, timestamp.HashAlgorithm);

            TimestampVerifier verifier          = new TimestampVerifier();
            TimestampObject   verifiedTimestamp = verifier.SetTimestampedData(data)
                                                  .SetTimestamp(timestamp.Timestamp)
                                                  .Verify();
        }
        public void TestVerifyTimestampSimple()
        {
            byte[] data = Encoding.UTF8.GetBytes(dataToTimestamp);

            TimestampCreator creator   = new TimestampCreator();
            TimestampObject  timestamp = creator
                                         .SetTsaPrimaryUrl(tsaUrl2)
                                         .SetHashAlgorithm(HashAlgorithm.SHA1)
                                         .SetOutputFormat(OutputFormat.TSR)
                                         .SetDataForTimestamping(data)
                                         .CreateTimestamp();

            Assert.AreEqual(HashAlgorithm.SHA1, timestamp.HashAlgorithm);

            TimestampVerifier verifier          = new TimestampVerifier();
            TimestampObject   verifiedTimestamp = verifier.SetTimestampedData(data)
                                                  .SetHashAlgorithm(HashAlgorithm.SHA1)
                                                  .SetTimestamp(timestamp.Timestamp)
                                                  .Verify();
        }