Esempio n. 1
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("."))
Esempio n. 2
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)
Esempio 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)
Esempio n. 4
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)
Esempio 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)
Esempio 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("."))
Esempio n. 7
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)
Esempio n. 8
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)
Esempio n. 9
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)
Esempio n. 10
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)
Esempio n. 11
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("."))
Esempio 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)
Esempio n. 13
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)
Esempio n. 14
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)
Esempio n. 15
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)
Esempio n. 16
0
 def to_string(self):
     return uh.render_mc3(self.ident, self.rounds, self.salt, self.checksum)