Exemple #1
0
 def __new__(self, obj=None):
     if isinstance(obj, int):
         return int.__new__(self, obj)
     elif obj is None:
         obj = getpass.getpass("Type or paste your passphrase > ")
     h = hash_sha256(
         obj.encode("utf-8") if not isinstance(obj, bytes) else obj)
     return int.__new__(self, int(h, 16))
Exemple #2
0
 def __new__(cls, *args, **kwargs):
     return int.__new__(cls, *args, **kwargs)
Exemple #3
0
 def __new__(cls, *args, **kwargs):
     return int.__new__(cls, *args, **kwargs)
Exemple #4
0
 def __new__(self, zr, module, option_id, value, valid_values):
     return int.__new__(self, value)