mirror of
https://github.com/docker/docs.git
synced 2026-04-02 17:28:55 +07:00
10 lines
161 B
Python
10 lines
161 B
Python
import json
|
|
import hashlib
|
|
|
|
|
|
def json_hash(obj):
|
|
dump = json.dumps(obj, sort_keys=True)
|
|
h = hashlib.sha256()
|
|
h.update(dump)
|
|
return h.hexdigest()
|