1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
+
-
+
-
+
-
+
-
+
-
+
-
+
|
# Auto generated from "PBKDF2-SHA1.txt"
package require tls
package require tcltest
tcltest::testConstraint PBKDF2 [expr {[lsearch -nocase [tls::kdfs] PBKDF2] > -1}]
tcltest::testConstraint SHA1 [expr {[lsearch -nocase [tls::digests] SHA1] > -1}]
tcltest::test KDF_PBKDF2-SHA1-1.1 {PBKDF2-SHA1} \
-constraints PBKDF2 \
-constraints {PBKDF2 SHA1} \
-setup {} \
-body {binary encode hex [tls::pbkdf2 -digest SHA1 -password "password" -salt "salt" -iterations 1 -size 20]} \
-match exact -result 0c60c80f961f0e71f3a9b524af6012062fe037a6
tcltest::test KDF_PBKDF2-SHA1-1.2 {PBKDF2-SHA1} \
-constraints PBKDF2 \
-constraints {PBKDF2 SHA1} \
-setup {} \
-body {binary encode hex [tls::pbkdf2 -digest SHA1 -password "password" -salt "salt" -iterations 2 -size 20]} \
-match exact -result ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957
tcltest::test KDF_PBKDF2-SHA1-1.3 {PBKDF2-SHA1} \
-constraints PBKDF2 \
-constraints {PBKDF2 SHA1} \
-setup {} \
-body {binary encode hex [tls::pbkdf2 -digest SHA1 -password "password" -salt "salt" -iterations 4096 -size 20]} \
-match exact -result 4b007901b765489abead49d926f721d065a429c1
tcltest::test KDF_PBKDF2-SHA1-1.4 {PBKDF2-SHA1} \
-constraints PBKDF2 \
-constraints {PBKDF2 SHA1} \
-setup {} \
-body {binary encode hex [tls::pbkdf2 -digest SHA1 -password "password" -salt "salt" -iterations 16777216 -size 20]} \
-match exact -result eefe3d61cd4da4e4e9945b3d6ba2158c2634e984
tcltest::test KDF_PBKDF2-SHA1-1.5 {PBKDF2-SHA1} \
-constraints PBKDF2 \
-constraints {PBKDF2 SHA1} \
-setup {} \
-body {binary encode hex [tls::pbkdf2 -digest SHA1 -password "passwordPASSWORDpassword" -salt "saltSALTsaltSALTsaltSALTsaltSALTsalt" -iterations 4096 -size 25]} \
-match exact -result 3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038
tcltest::test KDF_PBKDF2-SHA1-1.6 {PBKDF2-SHA1} \
-constraints PBKDF2 \
-constraints {PBKDF2 SHA1} \
-setup {} \
-body {binary encode hex [tls::pbkdf2 -digest SHA1 -password "pass\0word" -salt "sa\0lt" -iterations 4096 -size 16]} \
-match exact -result 56fa6aa75548099dcc37d7f03425e0c3
# Cleanup
::tcltest::cleanupTests
return
|