File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ static struct digest {
203
203
data = VAL_BIN_DATA (arg );
204
204
}
205
205
206
- if (sym > SYM_CRC32 && sym <= SYM_SHA512 ) {
206
+ if (sym > SYM_CRC32 && sym <= SYM_RIPEMD160 ) {
207
207
// O: could be optimized using index computed from `sym`
208
208
// find matching digest:
209
209
for (i = 0 ; i < sizeof (digests ) / sizeof (digests [0 ]); i ++ ) {
Original file line number Diff line number Diff line change @@ -172,7 +172,27 @@ D2079D59D6984814DAC71CDEB38097DB52F77810391FD7B6F92FFBD64EA93DF8
172
172
--assert port? update port
173
173
--assert sum1 = port/data
174
174
close port
175
-
175
+ if find system/catalog/checksums 'ripemd160 [
176
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/2516
177
+ --test-- "checksum-port-ripemd160"
178
+ port: open checksum:ripemd160
179
+ sum1: checksum bin 'ripemd160
180
+ sum2: checksum join bin bin 'ripemd160
181
+ --assert #{ 595FEC4966B173C6CD00ECCAF1A007F3C6C5B938 } = sum1
182
+ --assert port? port
183
+ --assert open? port
184
+ --assert 'ripemd160 = port/spec/method
185
+ --assert port? write port bin
186
+ --assert sum1 = read port
187
+ --assert port? write port bin
188
+ --assert sum2 = read port
189
+ --assert sum2 = read port
190
+ --assert not open? close port
191
+ --assert port? write open port bin
192
+ --assert port? update port
193
+ --assert sum1 = port/data
194
+ close port
195
+ ]
176
196
--test-- "checksum-write-refinements"
177
197
port: open checksum://
178
198
write /part port bin 1
You can’t perform that action at this time.
0 commit comments