I am getting two different results for simple data on the command line in Kubo versus with this library.
I believe the values should be equivalent:
With python:
# data
# {}
# ipfs (kubo)
# bafyreigbtj4x7ip5legnfznufuopl4sg4knzc2cof6duas4b3q2fy6swua
# ipfs-cid
# bafkreicecnx2gvntm6fbcrvnc336qze6st5u7qq7457igegamd3bzkx7ri
"""
ex = {}
d = json.dumps(ex, sort_keys=True)
cid_hash = cid_sha256_hash(d.encode())
return cid_hash
With the ipfs cli tool kubo:
echo "{}" | ./ipfs dag put
bafyreigbtj4x7ip5legnfznufuopl4sg4knzc2cof6duas4b3q2fy6swua
Ideally the Python library would match the reference implementation. Am I missing something simple, or are the two algorithms not outputting equivalent data?
I am getting two different results for simple data on the command line in Kubo versus with this library.
I believe the values should be equivalent:
With python:
With the ipfs cli tool kubo:
Ideally the Python library would match the reference implementation. Am I missing something simple, or are the two algorithms not outputting equivalent data?