-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The hash
function returns a value with all bytes set to 0x00
when also the cryptonite
package is loaded. The script below exposes the issue on my system. But it has been found to only show up randomly, so it may be necessary to build both packages in a sandbox a few times in order to reproduce the issue.
#!/bin/bash
cat > Tmp.hs << EOF
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Crypto.Hash.BLAKE2.BLAKE2b
main = print $ hash 64 mempty "abc"
EOF
function get-id { ghc-pkg field $1 id | cut -d ' ' -f 2 ; }
rm -f out
ghc -package-id `get-id blake2` ./Tmp.hs -o out
./out
rm -f out
ghc -package-id `get-id blake2` -package-id `get-id cryptonite` ./Tmp.hs -o out
./out
mightybyte
Metadata
Metadata
Assignees
Labels
No labels