diff --git a/didcomm_messaging/crypto/askar/__init__.py b/didcomm_messaging/crypto/askar/__init__.py index 036e58b..63f3c4a 100644 --- a/didcomm_messaging/crypto/askar/__init__.py +++ b/didcomm_messaging/crypto/askar/__init__.py @@ -2,6 +2,7 @@ from collections import OrderedDict import json from typing import Optional, Sequence, Union +import hashlib from pydid import VerificationMethod from didcomm_messaging.crypto import SecretsManager @@ -323,7 +324,7 @@ async def ecdh_1pu_encrypt( agree_alg = recip_key.key.algorithm apv.append(recip_key.kid) apv.sort() - apv = b64url(".".join(apv)) + apv = b64url(hashlib.sha256((".".join(apv)).encode()).digest()) builder.set_protected( OrderedDict(