Just make the io.Reader etc aliases

This commit is contained in:
gingerBill
2023-06-08 16:38:57 +01:00
parent 3f6775e29b
commit 9ee4b76cd9
41 changed files with 137 additions and 142 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ hash_stream_256 :: proc(s: io.Stream) -> ([DIGEST_SIZE_256]byte, bool) {
defer delete(buf)
i := 1
for i > 0 {
i, _ = io.read({s}, buf)
i, _ = io.read(s, buf)
if i > 0 {
botan.hash_update(ctx, len(buf) == 0 ? nil : &buf[0], uint(i))
}
@@ -151,7 +151,7 @@ hash_stream_512 :: proc(s: io.Stream) -> ([DIGEST_SIZE_512]byte, bool) {
defer delete(buf)
i := 1
for i > 0 {
i, _ = io.read({s}, buf)
i, _ = io.read(s, buf)
if i > 0 {
botan.hash_update(ctx, len(buf) == 0 ? nil : &buf[0], uint(i))
}
@@ -230,7 +230,7 @@ hash_stream_slice :: proc(s: io.Stream, bit_size: int, allocator := context.allo
defer delete(buf)
i := 1
for i > 0 {
i, _ = io.read({s}, buf)
i, _ = io.read(s, buf)
if i > 0 {
botan.hash_update(ctx, len(buf) == 0 ? nil : &buf[0], uint(i))
}