def testSponsorDisclosesEncryptedAttribute(addedEncryptedAttribute, symEncData,
looper, userSignerA, sponsorSigner,
sponsor):
box = libnacl.public.Box(sponsorSigner.naclSigner.keyraw,
userSignerA.naclSigner.verraw)
data = json.dumps({SKEY: symEncData.secretKey,
TXN_ID: addedEncryptedAttribute[TXN_ID]})
nonce, boxedMsg = box.encrypt(data.encode(), pack_nonce=False)
op = {
TARGET_NYM: userSignerA.verstr,
TXN_TYPE: ATTRIB,
NONCE: base58.b58encode(nonce),
ENC: base58.b58encode(boxedMsg)
}
submitAndCheck(looper, sponsor, op,
identifier=sponsorSigner.verstr)
评论列表
文章目录