Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

digest!(::T, !Matched::UInt32, ::Ptr{UInt8}) arg type mismatch for shake #118

Closed
inkydragon opened this issue Dec 14, 2024 · 0 comments · Fixed by #117
Closed

digest!(::T, !Matched::UInt32, ::Ptr{UInt8}) arg type mismatch for shake #118

inkydragon opened this issue Dec 14, 2024 · 0 comments · Fixed by #117

Comments

@inkydragon
Copy link
Collaborator

With #116

https://buildkite.com/julialang/julia-master/builds/43001#0193c419-2f52-48df-b67a-b2e771083426/877-1789

Error During Test at /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/test/runtests.jl:180
  Test threw exception
  Expression: SHA.shake256(hex2bytes(k[1]), k[2]) == hex2bytes(v)
  MethodError: no method matching digest!(::SHA.SHAKE_256_CTX, ::UInt64, ::Ptr{UInt8})
  The function `digest!` exists, but no method is defined for this combination of argument types.
  Closest candidates are:
    digest!(::T, !Matched::UInt32, ::Ptr{UInt8}) where T<:SHA.SHAKE
     @ SHA /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/src/shake.jl:73
    digest!(::T) where T<:SHA.SHA3_CTX
     @ SHA /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/src/sha3.jl:57
    digest!(::T) where T<:SHA.SHA_CTX
     @ SHA /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/src/common.jl:108
    ...
  Stacktrace:
   [1] digest!(context::SHA.SHAKE_256_CTX, d::UInt32, p::Ptr{UInt8})
     @ SHA /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/src/shake.jl:102
   [2] shake256(data::Vector{UInt8}, d::UInt32)
     @ SHA /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/src/shake.jl:129
   [3] macro expansion
     @ /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]
   [4] macro expansion
     @ /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/test/runtests.jl:180 [inlined]
   [5] macro expansion
     @ /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/Test/src/Test.jl:1724 [inlined]
   [6] macro expansion
     @ /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/test/runtests.jl:179 [inlined]
   [7] macro expansion
     @ /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/Test/src/Test.jl:1724 [inlined]
   [8] top-level scope
     @ /cache/build/tester-amdci4-11/julialang/julia-master/julia-7294acd59f/share/julia/stdlib/v1.12/SHA/test/runtests.jl:170

xref: JuliaLang/julia#56829

We need to make sure (d - blocklen(T)) isa UInt.
UInt32 for x86 platform.

digest!(context,d-blocklen(T),p)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant