Update the digest self-tests to use okx(), and centralise concepts and data shared between tests for multiple algorithms to reduce duplicated code. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
||
38 | 38 |
|
39 | 39 |
|
40 | 40 |
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
41 | 57 |
|
42 | 58 |
|
43 | 59 |
|
44 | 60 |
|
45 |
|
|
61 |
|
|
46 | 62 |
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
53 | 67 |
|
54 |
|
|
55 |
|
|
56 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
57 | 72 |
|
58 | 73 |
|
74 |
|
|
75 |
|
|
59 | 76 |
|
60 | 77 |
|
61 | 78 |
|
79 |
|
|
80 |
|
|
81 |
|
|
62 | 82 |
|
63 | 83 |
|
64 | 84 |
|
|
||
78 | 98 |
|
79 | 99 |
|
80 | 100 |
|
81 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
|
82 | 123 |
|
83 | 124 |
|
84 | 125 |
|
|
||
7 | 7 |
|
8 | 8 |
|
9 | 9 |
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
17 | 22 |
|
18 | 23 |
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
23 | 103 |
|
24 | 104 |
|
25 |
|
|
105 |
|
|
26 | 106 |
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
107 |
|
|
32 | 108 |
|
33 |
|
|
34 |
|
|
35 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
|
36 | 114 |
|
37 | 115 |
|
|
||
27 | 27 |
|
28 | 28 |
|
29 | 29 |
|
30 |
|
|
31 |
|
|
30 | 32 |
|
31 | 33 |
|
32 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
33 | 37 |
|
34 | 38 |
|
35 | 39 |
|
36 | 40 |
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
46 | 45 |
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
62 | 50 |
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
69 | 55 |
|
70 | 56 |
|
71 | 57 |
|
72 | 58 |
|
73 | 59 |
|
74 | 60 |
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 | 61 |
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
94 | 66 |
|
95 |
|
|
96 |
|
|
97 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
98 | 70 |
|
99 | 71 |
|
100 | 72 |
|
|
||
27 | 27 |
|
28 | 28 |
|
29 | 29 |
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
30 | 34 |
|
31 | 35 |
|
32 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
33 | 39 |
|
34 | 40 |
|
35 | 41 |
|
36 | 42 |
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
46 | 48 |
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
67 | 54 |
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
74 | 60 |
|
75 | 61 |
|
76 | 62 |
|
77 | 63 |
|
78 | 64 |
|
79 | 65 |
|
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 | 66 |
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
99 | 71 |
|
100 |
|
|
101 |
|
|
102 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
103 | 75 |
|
104 | 76 |
|
105 | 77 |
|
|
||
27 | 27 |
|
28 | 28 |
|
29 | 29 |
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
30 | 34 |
|
31 | 35 |
|
32 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
33 | 39 |
|
34 | 40 |
|
35 | 41 |
|
36 | 42 |
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
46 | 49 |
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
70 | 56 |
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
77 | 63 |
|
78 | 64 |
|
79 | 65 |
|
80 | 66 |
|
81 | 67 |
|
82 | 68 |
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 | 69 |
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
102 | 74 |
|
103 |
|
|
104 |
|
|
105 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
106 | 78 |
|
107 | 79 |
|
108 | 80 |
|