Exemple #1
0
 async def _genContxt(self, schemaId: ID, iA, userId):
     iA = strToInt(str(iA))
     userId = strToInt(str(userId))
     S = iA | userId
     H = get_hash_as_int(S)
     m2 = cmod.integer(H % (2**LARGE_MASTER_SECRET))
     await self.wallet.submitContextAttr(schemaId, m2)
     return m2
Exemple #2
0
 def _get_hash(self, CList, TauList, nonce):
     return get_hash_as_int(nonce,
                            *reduce(lambda x, y: x + y, [TauList, CList]))
Exemple #3
0
def _checkHashEqual(input):
    h1 = get_hash_as_int(*input)
    h2 = get_hash_as_int(*reversed(input))
    assert h1 == h2