Example #1
0
 def to_string(self):
     salt = self.salt
     chk = salt[:2] + self.checksum
     if self.use_duplicate_salt:
         # filling in salt field, so that we're compatible with django 1.0
         return uh.render_mc2(self.ident, salt, chk)
     else:
         # django 1.4+ style hash
         return uh.render_mc2(self.ident, "", chk)
Example #2
0
 def to_string(self):
     return uh.render_mc2(self.ident, self.salt, self.checksum)