예제 #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
파일: django.py 프로젝트: Kiln707/Passlib2
 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
파일: django.py 프로젝트: dragoncsc/HDsite
 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)