def testTrustAnchorDisclosesEncryptedAttribute(addedEncryptedAttribute, symEncData,
looper, userSignerA, trustAnchorSigner,
trustAnchor):
box = libnacl.public.Box(trustAnchorSigner.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, trustAnchor, op,
identifier=trustAnchorSigner.verstr)
test_nym_attrib.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录