示例#1
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)
示例#2
0
 def _get_config(self):
     rounds = self.rounds
     if rounds == 400:
         rounds = None
     return uh.render_mc3(self.ident,
                          rounds,
                          self.salt,
                          None,
                          rounds_base=16)
示例#3
0
 def to_string(self):
     rounds = self.rounds
     if rounds == 400:
         rounds = None
     return uh.render_mc3(self.ident,
                          rounds,
                          self.salt,
                          self.checksum,
                          rounds_base=16)
示例#4
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)
示例#5
0
 def to_string(self):
     return uh.render_mc3(self.ident, self.rounds, self.salt, self.checksum)
示例#6
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)
示例#7
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('.'))