Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
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
cpython
Commits
0fbd94ce
Kaydet (Commit)
0fbd94ce
authored
Eki 19, 2013
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18582: skip test of _hashlib.pbkdf2_hmac if OpenSSL is not available or too old
üst
55e092f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
test_hashlib.py
Lib/test/test_hashlib.py
+8
-11
No files found.
Lib/test/test_hashlib.py
Dosyayı görüntüle @
0fbd94ce
...
...
@@ -548,8 +548,7 @@ class HashLibTestCase(unittest.TestCase):
self
.
assertEqual
(
expected_hash
,
hasher
.
hexdigest
())
class
KDFTests
:
hashlibmod
=
None
class
KDFTests
(
unittest
.
TestCase
):
pbkdf2_test_vectors
=
[
(
b
'password'
,
b
'salt'
,
1
,
None
),
...
...
@@ -600,9 +599,7 @@ class KDFTests:
(
bytes
.
fromhex
(
'9d9e9c4cd21fe4be24d5b8244c759665'
),
None
),],
}
def
test_pbkdf2_hmac
(
self
):
pbkdf2
=
self
.
hashlibmod
.
pbkdf2_hmac
def
_test_pbkdf2_hmac
(
self
,
pbkdf2
):
for
digest_name
,
results
in
self
.
pbkdf2_results
.
items
():
for
i
,
vector
in
enumerate
(
self
.
pbkdf2_test_vectors
):
password
,
salt
,
rounds
,
dklen
=
vector
...
...
@@ -631,13 +628,13 @@ class KDFTests:
with
self
.
assertRaisesRegex
(
ValueError
,
'unsupported hash type'
):
pbkdf2
(
'unknown'
,
b
'pass'
,
b
'salt'
,
1
)
def
test_pbkdf2_hmac_py
(
self
):
self
.
_test_pbkdf2_hmac
(
py_hashlib
.
pbkdf2_hmac
)
class
PyKDFTests
(
KDFTests
,
unittest
.
TestCase
):
hashlibmod
=
py_hashlib
class
CKDFTests
(
KDFTests
,
unittest
.
TestCase
):
hashlibmod
=
c_hashlib
@unittest.skipUnless
(
hasattr
(
c_hashlib
,
'pbkdf2_hmac'
),
' test requires OpenSSL > 1.0'
)
def
test_pbkdf2_hmac_c
(
self
):
self
.
_test_pbkdf2_hmac
(
c_hashlib
.
pbkdf2_hmac
)
if
__name__
==
"__main__"
:
...
...
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