コード例 #1
0
ファイル: ticketing.py プロジェクト: Python-PyBD/logbook
 def hash_record_raw(self, record):
     """Returns the unique hash of a record."""
     hash = HashingHandlerMixin.hash_record_raw(self, record)
     if self.hash_salt is not None:
         hash_salt = self.hash_salt
         if not PY2 or isinstance(hash_salt, unicode):
             hash_salt = hash_salt.encode('utf-8')
         hash.update(b('\x00') + hash_salt)
     return hash
コード例 #2
0
ファイル: ticketing.py プロジェクト: dzderic/logbook
 def hash_record_raw(self, record):
     """Returns the unique hash of a record."""
     hash = HashingHandlerMixin.hash_record_raw(self, record)
     if self.hash_salt is not None:
         hash_salt = self.hash_salt
         if not PY2 or isinstance(hash_salt, unicode):
             hash_salt = hash_salt.encode('utf-8')
         hash.update(b('\x00') + hash_salt)
     return hash
コード例 #3
0
 def hash_record_raw(self, record):
     """Returns the unique hash of a record."""
     hash = HashingHandlerMixin.hash_record_raw(self, record)
     if self.hash_salt is not None:
         hash.update('\x00' + self.hash_salt)
     return hash