Example #1
0
 /// <summary>
 /// Sets data for timestamping by providing byte arrays.
 /// </summary>
 /// <param name="datas"></param>
 public ITimestampCreator SetDataForTimestamping(byte[][] datas)
 {
     this.timestampData = new TimestampData(datas);
     return(this);
 }
Example #2
0
 /// <summary>
 /// Sets already hashed messages to be timestamped.
 /// </summary>
 /// <param name="digests"></param>
 public ITimestampCreator SetMessageDigestForTimestamping(byte[][] digests)
 {
     this.timestampData = new TimestampData(digests, true);
     return(this);
 }
Example #3
0
 /// <summary>
 /// Sets data for timestamping by providing streams.
 /// </summary>
 /// <param name="streams"></param>
 public ITimestampCreator SetDataForTimestamping(Stream[] streams)
 {
     this.timestampData = new TimestampData(streams);
     return(this);
 }
Example #4
0
 /// <summary>
 /// Sets data for timestamping by providing paths to files.
 /// </summary>
 /// <param name="pathsToFiles"></param>
 public ITimestampCreator SetDataForTimestamping(string[] pathsToFiles)
 {
     this.timestampData = new TimestampData(pathsToFiles);
     return(this);
 }
Example #5
0
        public static byte[] GetTimestampForOutput(TimeStampResponse response, OutputFormat outputFormat, TimestampData timestampData)
        {
            switch (outputFormat)
            {
            case OutputFormat.TSR:
                return(response.GetEncoded());

            case OutputFormat.ASICS:
                return(Utils.GetAsics(response.GetEncoded(), timestampData.GetRawData(), timestampData.HasMultipleFiles()));
            }
            return(null);
        }
 /// <summary>
 /// Sets the timestamped data by providing paths to files.
 /// </summary>
 /// <param name="pathsToFiles">The paths to files.</param>
 /// <returns></returns>
 public ITimestampVerifier SetTimestampedData(string[] pathsToFiles)
 {
     this.timestampData = new TimestampData(pathsToFiles);
     return(this);
 }
 /// <summary>
 /// Sets the timestamped data by providing byte arrays.
 /// </summary>
 /// <param name="datas">The datas.</param>
 /// <returns></returns>
 public ITimestampVerifier SetTimestampedData(byte[][] datas)
 {
     this.timestampData = new TimestampData(datas);
     return(this);
 }
 /// <summary>
 /// Sets the timestamped data by providing streams.
 /// </summary>
 /// <param name="streams">The streams.</param>
 /// <returns></returns>
 public ITimestampVerifier SetTimestampedData(Stream[] streams)
 {
     this.timestampData = new TimestampData(streams);
     return(this);
 }
 /// <summary>
 /// Sets already hashed messages.
 /// </summary>
 /// <param name="digests">The digests.</param>
 /// <returns></returns>
 public ITimestampVerifier SetMessageDigest(byte[][] digests)
 {
     this.timestampData = new TimestampData(digests, true);
     return(this);
 }