Verify data

👍

Too busy to read the documentation?

You will find here very simple curl and shell code samples demonstrating the basic usage of the Woleet API.

Verifying the timestamp, the seal and the signature of a file using the Woleet API is straightforward. It only requires you to have the file itself and the proof receipt.

First of all, you need to compute the SHA256 hash of your file (its 'digital fingerprint') to ensure that the proof receipt was actually created for this file.

Let's do it using a simple shell command using openssl to do the computation:

$ cat <your file> | openssl dgst -sha256 |  cut -d " " -f 2

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Now that you know the SHA256 hash of your file, you must:

  • for a proof of timestamp: verify that the targetHash attribute matches the file hash
  • for a proof of seal or signature: verify that the signature.signedHash attribute matches the file hash

Now that you are sure the file matches the proof receipt, you can verify the proof.
Let's do it using a simple curl command to do a POST request:

curl --request POST \
  --url 'https://api.woleet.io/v1/receipt/verify'
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  -d @<your proof receipt>

{
  "code":"VERIFIED",
  "timestamp":1603371010000,
  "confirmations":2929
}

Your proof is verified!

You can find a complete description of the verification results in the reference documentation.

📘

How can I verify a proof independently from Woleet ?

📘

What about Java, Javascript, Node, Python and PHP code samples?

For other programming languages, you can generate sample code using our actionable API Reference.