def reveal(secret): if isinstance(secret, _number): return secret.reveal() if secret.is_gf2n: res = cgf2n() else: res = cint() instructions.asm_open(res, secret) return res
def reveal(secret): try: return secret.reveal() except AttributeError: if secret.is_gf2n: res = cgf2n() else: res = cint() instructions.asm_open(res, secret) return res