From 0d820b19c4dd4d4889ff5cbbbebfc09f3e4ec1a1 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 May 2024 13:13:52 +0200 Subject: [PATCH] refactor now --- did_generate.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/did_generate.py b/did_generate.py index 61987aa..d415ab9 100644 --- a/did_generate.py +++ b/did_generate.py @@ -6,20 +6,12 @@ import nacl.encoding from jwcrypto import jwk from nacl.signing import SigningKey from nacl.encoding import RawEncoder -from datetime import datetime, timezone - - -def now(): - timestamp = datetime.now(timezone.utc).replace(microsecond=0) - formatted_timestamp = timestamp.strftime("%Y-%m-%dT%H:%M:%SZ") - return formatted_timestamp def key_to_did(public_key_bytes, type_did): """did-key-format := did:key:MULTIBASE(base58-btc, MULTICODEC(public-key-type, raw-public-key-bytes))""" - #public_key_bytes = public_key.encode() mc = multicodec.add_prefix('ed25519-pub', public_key_bytes) # Multibase encode the hashed bytes