Exemplo n.º 1
0
 def to_string(self, withchk=True):
     rounds = self.rounds
     if rounds == 400:
         rounds = None # omit rounds measurement if == 400
     return uh.render_mc3(self.ident, rounds, self.salt,
                          checksum=self.checksum if withchk else None,
                          rounds_base=16)
Exemplo n.º 2
0
 def to_string(self, withchk=True):
     rounds = self.rounds
     if rounds == 400:
         rounds = None # omit rounds measurement if == 400
     return uh.render_mc3(self.ident, rounds, self.salt,
                          checksum=self.checksum if withchk else None,
                          rounds_base=16)
Exemplo n.º 3
0
 def to_string(self, withchk=True):
     salt = b64encode(self.salt, CTA_ALTCHARS).decode("ascii")
     if withchk and self.checksum:
         chk = b64encode(self.checksum, CTA_ALTCHARS).decode("ascii")
     else:
         chk = None
     return uh.render_mc3(self.ident, self.rounds, salt, chk, rounds_base=16)
Exemplo n.º 4
0
 def to_string(self, withchk=True):
     salt = hexlify(self.salt).decode("ascii").upper()
     if withchk and self.checksum:
         chk = hexlify(self.checksum).decode("ascii").upper()
     else:
         chk = None
     return uh.render_mc3(self.ident, self.rounds, salt, chk, sep=u("."))
Exemplo n.º 5
0
 def to_string(self, withchk=True):
     salt = ab64_encode(self.salt).decode("ascii")
     if withchk and self.checksum:
         chk = ab64_encode(self.checksum).decode("ascii")
     else:
         chk = None
     return uh.render_mc3(self.ident, self.rounds, salt, chk)
Exemplo n.º 6
0
 def to_string(self, withchk=True):
     salt = hexlify(self.salt).decode("ascii").upper()
     if withchk and self.checksum:
         chk = hexlify(self.checksum).decode("ascii").upper()
     else:
         chk = None
     return uh.render_mc3(self.ident, self.rounds, salt, chk, sep=u("."))
Exemplo n.º 7
0
 def to_string(self, withchk=True):
     salt = b64encode(self.salt, CTA_ALTCHARS).decode("ascii")
     if withchk and self.checksum:
         chk = b64encode(self.checksum, CTA_ALTCHARS).decode("ascii")
     else:
         chk = None
     return uh.render_mc3(self.ident, self.rounds, salt, chk, rounds_base=16)
Exemplo n.º 8
0
 def to_string(self, withchk=True):
     salt = ab64_encode(self.salt).decode("ascii")
     if withchk and self.checksum:
         chk = ab64_encode(self.checksum).decode("ascii")
     else:
         chk = None
     return uh.render_mc3(self.ident, self.rounds, salt, chk)
Exemplo n.º 9
0
 def to_string(self):
     salt = b64encode(self.salt, CTA_ALTCHARS).decode("ascii")
     chk = b64encode(self.checksum, CTA_ALTCHARS).decode("ascii")
     return uh.render_mc3(self.ident,
                          self.rounds,
                          salt,
                          chk,
                          rounds_base=16)
Exemplo n.º 10
0
 def to_string(self):
     rounds = self.rounds
     if rounds == 400:
         rounds = None  # omit rounds measurement if == 400
     return uh.render_mc3(self.ident,
                          rounds,
                          self.salt,
                          self.checksum,
                          rounds_base=16)
Exemplo n.º 11
0
 def _get_config(self):
     rounds = self.rounds
     if rounds == 400:
         rounds = None  # omit rounds measurement if == 400
     return uh.render_mc3(self.ident,
                          rounds,
                          self.salt,
                          None,
                          rounds_base=16)
Exemplo n.º 12
0
 def _get_config(self):
     rounds = self.rounds
     if rounds == 400:
         rounds = None # omit rounds measurement if == 400
     return uh.render_mc3(self.ident, rounds, self.salt, None, rounds_base=16)
Exemplo n.º 13
0
 def to_string(self):
     salt = hexlify(self.salt).decode("ascii").upper()
     chk = hexlify(self.checksum).decode("ascii").upper()
     return uh.render_mc3(self.ident, self.rounds, salt, chk, sep=u("."))
Exemplo n.º 14
0
 def to_string(self):
     salt = hexlify(self.salt).decode("ascii").upper()
     chk = hexlify(self.checksum).decode("ascii").upper()
     return uh.render_mc3(self.ident, self.rounds, salt, chk, sep=u("."))
Exemplo n.º 15
0
 def to_string(self):
     return uh.render_mc3(self.ident, self.rounds, self.salt, self.checksum
                          or self._stub_checksum)
Exemplo n.º 16
0
 def to_string(self):
     salt = ab64_encode(self.salt).decode("ascii")
     chk = ab64_encode(self.checksum).decode("ascii")
     return uh.render_mc3(self.ident, self.rounds, salt, chk)
Exemplo n.º 17
0
 def to_string(self, config=False):
     chk = None if config else self.checksum
     return uh.render_mc3(self.ident, self.rounds, self.salt, chk)
Exemplo n.º 18
0
 def to_string(self):
     return uh.render_mc3(self.ident, self.rounds, self.salt,
                          self.checksum or self._stub_checksum)
Exemplo n.º 19
0
 def to_string(self):
     salt = ab64_encode(self.salt).decode("ascii")
     chk = ab64_encode(self.checksum).decode("ascii")
     return uh.render_mc3(self.ident, self.rounds, salt, chk)
Exemplo n.º 20
0
 def to_string(self):
     rounds = self.rounds
     if rounds == 400:
         rounds = None # omit rounds measurement if == 400
     return uh.render_mc3(self.ident, rounds, self.salt, self.checksum, rounds_base=16)
Exemplo n.º 21
0
 def to_string(self, config=False):
     chk = None if config else self.checksum
     return uh.render_mc3(self.ident, self.rounds, self.salt, chk)
Exemplo n.º 22
0
 def to_string(self):
     salt = b64encode(self.salt, CTA_ALTCHARS).decode("ascii")
     chk = b64encode(self.checksum, CTA_ALTCHARS).decode("ascii")
     return uh.render_mc3(self.ident, self.rounds, salt, chk, rounds_base=16)