IdHub/apiregiter.py

18 lines
299 B
Python
Raw Normal View History

2023-10-26 16:06:52 +00:00
import uuid
import hashlib
class Iota:
"""
Framework for simulate the comunication with IOTA DLT
"""
def issue_did(self):
u = str(uuid.uuid4()).encode()
d = hashlib.sha3_256(u).hexdigest()
did = "did:iota:{}".format(d)
return did
iota = Iota()