Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
immoschuett committed Nov 9, 2023
1 parent 8bd938c commit 4c08c9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SHA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ for (f, ctx) in [(:sha1, :SHA1_CTX),
See also [`$($ctx)`](@ref).
"""
function $f(data::AbstractBytes)
_ = $ctx()
ctx = $ctx()
update!(ctx, data)
return digest!(ctx)
end
Expand Down Expand Up @@ -116,7 +116,7 @@ for (f, ctx) in [(:sha1, :SHA1_CTX),
Hash data from io using `$($f)` algorithm.
"""
function $f(io::IO, chunk_size=4*1024)
_ = $ctx()
ctx = $ctx()
buff = Vector{UInt8}(undef, chunk_size)
while !eof(io)
num_read = readbytes!(io, buff)
Expand Down

0 comments on commit 4c08c9f

Please sign in to comment.