Skip to content
Matthias Görges edited this page Jul 13, 2015 · 2 revisions

timestamp-tsq-save saves a timestamp request to file.

Parameter Description
filename Filename for which TSQ is written (.tsq is appended)
tsq Timestamp query

Example

Example 1, as used in the Timestamp response verification piece of modules/timestamp/timestamp.scm

(let* ((tsq (timestamp-tsq-generate filename))
       (tsr (timestamp-tsr-request tsq)))
  (if (and tsq tsr (timestamp-tsr-granted? tsr)
           (fx= (timestamp-tsq-getnonce tsq) (timestamp-tsr-getnonce tsr))
           (equal? (timestamp-tsq-getmessage tsq) (timestamp-tsr-getmessage tsr)))
    (if (timestamp-tsr-save filename tsr)
      tsr
      #f
    )
    #f
  )
)

Sorry, there was an error rendering this page.

Clone this wiki locally