Skip to content

timestamp gettimestamp

Matthias Görges edited this page Jul 8, 2015 · 2 revisions

timestamp-gettimestamp obtain trusted timestamp for a given file. If successful it automatically saves the timestamp response to a file called filename.tsr

Parameter Description
filename Filename of file for which the trusted timestamp is obtained

Example

Example 1: Obtain a trusted timestamp for a file containing the string "LambdaNative" and verify its integrity

> (define filename "LNtest")
> (u8vector->file (u8vector 76 97 109 98 100 97 78 97 116 105 118 101) filename)
> (define tsr (timestamp-gettimestamp filename))
> (file-exists? (string-append filename ".tsr"))
#t
> (define cafile "chain.txt")
> (timestamp-verify (sha512sum filename) tsr cafile)
#t
Clone this wiki locally