main
Bob Mottram 2020-06-15 22:37:10 +01:00
parent 522af7dc06
commit 43d259d2d7
1 changed files with 5 additions and 1 deletions

View File

@ -43,6 +43,9 @@ def b64safeDecode(payload: {}) -> str:
def normalizeJson(payload: {}) -> str:
"""
Normalize with URDNA2015
"""
return json.dumps(payload, separators=(',', ':'),
sort_keys=True).encode('utf-8')
@ -141,7 +144,8 @@ def jsonldVerify(signedJldDocument: {}, publicKeyPem: str) -> bool:
def testSignJsonld(jldDocument: {}, privateKeyPem: str) -> {}:
"""Creates a test signature
"""
Creates a test signature
"""
signedJldDocument = jsonldSign(jldDocument, privateKeyPem)