How do I manually check the base64 content-MD5 stored in Swarm?

How do I manually check the base64 content-MD5 stored in Swarm?

  • Create a file with Content-MD5 (this example uses SimpleCAS.py, but that isn't necessary):

>SimpleCas.py write hi.txt md5=yes

efabc60b79b8d602151ccc4888302644

  • Check the md5:

>SimpleCas.py info efabc60b79b8d602151ccc4888302644

HTTP/1.1 200 OK

CAStor-Create-Date: 2012-03-26 20:19:02.953875

Castor-System-Cluster: clusterB.enfield.com

Castor-System-Created: Mon, 26 Mar 2012 20:19:02 GMT

Content-Disposition: inline; filename=hi.txt

Content-Length: 12

Content-MD5: b1kCrCNwJL3QwXbLkwY9xA==

Content-type: text/plain

Last-Modified: Mon, 26 Mar 2012 20:19:02 GMT

lifepoint: [Wed, 25 Apr 2012 20:19:02 GMT] reps=2, deletable=yes

lifepoint: [] delete

Etag: "efabc60b79b8d602151ccc4888302644"

Date: Mon, 26 Mar 2012 20:19:07 GMT

Server: CAStor Cluster/5.1.4

  • Manually create the MD5:

>  cat hi.txt | openssl dgst -md5 -binary | openssl enc -base64

b1kCrCNwJL3QwXbLkwY9xA==