Пример #1
0
 def _calc_checksum(self, secret):
     # NOTE: we lazily import des_crypt,
     #       since most django deploys won't use django_des_crypt
     global des_crypt
     if des_crypt is None:
         _import_des_crypt()
     return des_crypt(salt=self.salt[:2])._calc_checksum(secret)
Пример #2
0
 def _calc_checksum(self, secret):
     # NOTE: we lazily import des_crypt,
     #       since most django deploys won't use django_des_crypt
     global des_crypt
     if des_crypt is None:
         _import_des_crypt()
     return des_crypt(salt=self.salt[:2])._calc_checksum(secret)
Пример #3
0
 def _calc_checksum(self, secret):
     # NOTE: we lazily import des_crypt,
     #       since most django deploys won't use django_des_crypt
     global des_crypt
     if des_crypt is None:
         _import_des_crypt()
     # check for truncation (during .hash() calls only)
     if self.use_defaults:
         self._check_truncate_policy(secret)
     return des_crypt(salt=self.salt[:2])._calc_checksum(secret)
Пример #4
0
 def _calc_checksum(self, secret):
     # NOTE: we lazily import des_crypt,
     #       since most django deploys won't use django_des_crypt
     global des_crypt
     if des_crypt is None:
         _import_des_crypt()
     # check for truncation (during .hash() calls only)
     if self.use_defaults:
         self._check_truncate_policy(secret)
     return des_crypt(salt=self.salt[:2])._calc_checksum(secret)