示例#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)
示例#2
0
文件: pbkdf2.py 项目: Aravs7/ubtz2
 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)
示例#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)
示例#4
0
文件: pbkdf2.py 项目: Aravs7/ubtz2
 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("."))
示例#5
0
文件: pbkdf2.py 项目: Aravs7/ubtz2
 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)
示例#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("."))
示例#7
0
文件: pbkdf2.py 项目: Aravs7/ubtz2
 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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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("."))
示例#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("."))
示例#15
0
 def to_string(self):
     return uh.render_mc3(self.ident, self.rounds, self.salt, self.checksum
                          or self._stub_checksum)
示例#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)
示例#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)
示例#18
0
 def to_string(self):
     return uh.render_mc3(self.ident, self.rounds, self.salt,
                          self.checksum or self._stub_checksum)
示例#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)
示例#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)
示例#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)
示例#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)