コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TimestampCreator"/> class.
 /// Also tries to load setting from configuration.
 /// </summary>
 public TimestampCreator()
 {
     this.tsaPrimaryUrl           = Utils.GetConfiguration("tsa.primary.url");
     this.tsaPrimaryCredentials   = new NetworkCredential(Utils.GetConfiguration("tsa.primary.username"), Utils.GetConfiguration("tsa.primary.password"));
     this.tsaSecondaryUrl         = Utils.GetConfiguration("tsa.secondary.url");
     this.tsaSecondaryCredentials = new NetworkCredential(Utils.GetConfiguration("tsa.secondary.username"), Utils.GetConfiguration("tsa.secondary.password"));
     int.TryParse(Utils.GetConfiguration("tsa.timeout"), out this.tsaTimeout);
     this.hashAlgorithm = HashAlgorithmExtensions.CreateFromString(Utils.GetConfiguration("hash.algorithm"));
     this.outputFormat  = OutputFormatExtensions.CreateFromString(Utils.GetConfiguration("timestamp.output"));
     int.TryParse(Utils.GetConfiguration("certificate.minimum.validity"), out this.minimumCertificateValidityPeriod);
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TimestampVerifier"/> class.
 /// Also tries to load settings from configuration.
 /// </summary>
 public TimestampVerifier()
 {
     this.hashAlgorithm = HashAlgorithmExtensions.CreateFromString(Utils.GetConfiguration("hash.algorithm"));
     int.TryParse(Utils.GetConfiguration("certificate.minimum.validity"), out this.minimumCertificateValidityPeriod);
 }