Diff

Differences From Artifact [dea59e87f8]:

To Artifact [24afc1448c]:


129
130
131
132
133
134
135




136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155





156
157
158
159

160
161
162
163

164
165
166
167
168
169
170
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158

159
160
161
162
163
164
165
166

167
168
169
170

171
172
173
174
175
176
177
178







+
+
+
+



















-
+
+
+
+
+



-
+



-
+







test Digest_Cmds-6.3 {sha1 cmd} -body {
	tls::sha1 "Example string for message digest tests."
    } -result {3AEFE840CA492C387E903F15ED6019E7AD833B47}

test Digest_Cmds-6.4 {sha256 cmd} -body {
	tls::sha256 "Example string for message digest tests."
    } -result {B7DFDDEB0314A74FF56A8AC1E3DC57DF09BB52A96DA50F6549EB62CA61A0A491}

test Digest_Cmds-6.5 {sha512 cmd} -body {
	tls::sha512 "Example string for message digest tests."
    } -result {B56EC55E33193E17B61D669FB7B04AD2483DE93FE847C411BBEAE6440ECEA6C7CFDD2E6F35A06CB189FC62D799E785CDB7A23178323789D001BC8E44A0B5907F}
# Test digest command for data


test Digest_Data-7.1 {md4} -body {
	tls::digest md4 "Example string for message digest tests."
    } -result {181CDCF9DB9B6FA8FC0A3BF9C34E29D9}

test Digest_Data-7.2 {md5} -body {
	tls::digest md5 "Example string for message digest tests."
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}

test Digest_Data-7.3 {sha1} -body {
	tls::digest sha1 "Example string for message digest tests."
    } -result {3AEFE840CA492C387E903F15ED6019E7AD833B47}

test Digest_Data-7.4 {sha256} -body {
	tls::digest sha256 "Example string for message digest tests."
    } -result {B7DFDDEB0314A74FF56A8AC1E3DC57DF09BB52A96DA50F6549EB62CA61A0A491}

test Digest_Data-7.5 {md5 bin} -body {
test Digest_Data-7.5 {sha512} -body {
	tls::digest sha512 "Example string for message digest tests."
    } -result {B56EC55E33193E17B61D669FB7B04AD2483DE93FE847C411BBEAE6440ECEA6C7CFDD2E6F35A06CB189FC62D799E785CDB7A23178323789D001BC8E44A0B5907F}

test Digest_Data-7.6 {md5 bin} -body {
	string toupper [binary encode hex [tls::digest md5 -bin "Example string for message digest tests."]]
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}

test Digest_Data-7.6 {md5 hex} -body {
test Digest_Data-7.7 {md5 hex} -body {
	tls::digest md5 -hex "Example string for message digest tests."
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}

test Digest_Data-7.7 {md5 with arg} -body {
test Digest_Data-7.8 {md5 with arg} -body {
	tls::digest md5 -data "Example string for message digest tests."
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}
# Test digest command for files


test Digest_File-8.1 {md4} -body {
	tls::digest md4 -file md_data.dat
178
179
180
181
182
183
184
185





186
187
188
189

190
191
192
193
194
195
196
186
187
188
189
190
191
192

193
194
195
196
197
198
199
200

201
202
203
204
205
206
207
208







-
+
+
+
+
+



-
+







	tls::digest sha1 -file md_data.dat
    } -result {3AEFE840CA492C387E903F15ED6019E7AD833B47}

test Digest_File-8.4 {sha256} -body {
	tls::digest sha256 -file md_data.dat
    } -result {B7DFDDEB0314A74FF56A8AC1E3DC57DF09BB52A96DA50F6549EB62CA61A0A491}

test Digest_File-8.5 {md5 bin} -body {
test Digest_File-8.5 {sha512} -body {
	tls::digest sha512 -file md_data.dat
    } -result {B56EC55E33193E17B61D669FB7B04AD2483DE93FE847C411BBEAE6440ECEA6C7CFDD2E6F35A06CB189FC62D799E785CDB7A23178323789D001BC8E44A0B5907F}

test Digest_File-8.6 {md5 bin} -body {
	string toupper [binary encode hex [tls::digest md5 -bin -file md_data.dat]]
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}

test Digest_File-8.6 {md5 hex} -body {
test Digest_File-8.7 {md5 hex} -body {
	tls::digest md5 -hex -file md_data.dat
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}
# Test digest command for channel


test Digest_Chan-9.1 {md4} -body {
	read_chan md4 md_data.dat
204
205
206
207
208
209
210
211





212
213
214
215

216
217
218
219
220
221
222
216
217
218
219
220
221
222

223
224
225
226
227
228
229
230

231
232
233
234
235
236
237
238







-
+
+
+
+
+



-
+







	read_chan sha1 md_data.dat
    } -result {3AEFE840CA492C387E903F15ED6019E7AD833B47}

test Digest_Chan-9.4 {sha256} -body {
	read_chan sha256 md_data.dat
    } -result {B7DFDDEB0314A74FF56A8AC1E3DC57DF09BB52A96DA50F6549EB62CA61A0A491}

test Digest_Chan-9.5 {md5 bin} -body {
test Digest_Chan-9.5 {sha512} -body {
	read_chan sha512 md_data.dat
    } -result {B56EC55E33193E17B61D669FB7B04AD2483DE93FE847C411BBEAE6440ECEA6C7CFDD2E6F35A06CB189FC62D799E785CDB7A23178323789D001BC8E44A0B5907F}

test Digest_Chan-9.6 {md5 bin} -body {
	string toupper [binary encode hex [read_chan md5 md_data.dat -bin]]
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}

test Digest_Chan-9.6 {md5 hex} -body {
test Digest_Chan-9.7 {md5 hex} -body {
	read_chan md5 md_data.dat -hex
    } -result {CCB1BE2E11D8183E843FF73DA8C6D206}
# Test HMAC


test Digest_HMAC-10.1 {data} -body {
	tls::digest md5 -key "Example key" -data "Example string for message digest tests."