Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
09d05686
Kaydet (Commit)
09d05686
authored
Haz 02, 2013
tarafından
Alex Gaynor
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Switched to using some constants the hmac module exposes.
üst
590a4116
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
crypto.py
django/utils/crypto.py
+2
-6
No files found.
django/utils/crypto.py
Dosyayı görüntüle @
09d05686
...
...
@@ -28,10 +28,6 @@ from django.utils import six
from
django.utils.six.moves
import
xrange
_trans_5c
=
bytearray
([(
x
^
0x5C
)
for
x
in
xrange
(
256
)])
_trans_36
=
bytearray
([(
x
^
0x36
)
for
x
in
xrange
(
256
)])
def
salted_hmac
(
key_salt
,
value
,
secret
=
None
):
"""
Returns the HMAC-SHA1 of 'value', using a key generated from key_salt and a
...
...
@@ -130,9 +126,9 @@ def _fast_hmac(key, msg, digest):
if
len
(
key
)
>
dig1
.
block_size
:
key
=
digest
(
key
)
.
digest
()
key
+=
b
'
\x00
'
*
(
dig1
.
block_size
-
len
(
key
))
dig1
.
update
(
key
.
translate
(
_
trans_36
))
dig1
.
update
(
key
.
translate
(
hmac
.
trans_36
))
dig1
.
update
(
msg
)
dig2
.
update
(
key
.
translate
(
_trans_5c
))
dig2
.
update
(
key
.
translate
(
hmac
.
trans_5C
))
dig2
.
update
(
dig1
.
digest
())
return
dig2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment