Skip to content

timestamp tsq getmessage

Matthias Görges edited this page Jul 13, 2015 · 1 revision

timestamp-tsq-getmessage returns the message imprint (file hash) of timestamp request.

Parameter Description
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
  )
)
Clone this wiki locally