Update to new io interface

This commit is contained in:
gingerBill
2023-06-08 16:35:24 +01:00
parent 4c17e2e97e
commit 3f6775e29b
49 changed files with 504 additions and 852 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ hash_stream_128 :: proc(s: io.Stream) -> ([DIGEST_SIZE_128]byte, bool) {
defer delete(buf)
read := 1
for read > 0 {
read, _ = s->impl_read(buf)
read, _ = io.read({s}, buf)
if read > 0 {
_sha3.update(&ctx, buf[:read])
}
@@ -155,7 +155,7 @@ hash_stream_256 :: proc(s: io.Stream) -> ([DIGEST_SIZE_256]byte, bool) {
defer delete(buf)
read := 1
for read > 0 {
read, _ = s->impl_read(buf)
read, _ = io.read({s}, buf)
if read > 0 {
_sha3.update(&ctx, buf[:read])
}