def doAttrDisclose(self, origin, target, txnId, key):
box = libnacl.public.Box(b58decode(origin), b58decode(target))
data = json.dumps({TXN_ID: txnId, SKEY: key})
nonce, boxedMsg = box.encrypt(data.encode(), pack_nonce=False)
op = {
TARGET_NYM: target,
TXN_TYPE: DISCLO,
NONCE: b58encode(nonce),
DATA: b58encode(boxedMsg)
}
self.submit(op, identifier=origin)
评论列表
文章目录