We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
printHashBytes32
1 parent 440dfeb commit 0fe7ff5Copy full SHA for 0fe7ff5
hnix-store-core/src/System/Nix/Internal/Hash.hs
@@ -126,7 +126,7 @@ printHashBytes32 :: BS.ByteString -> T.Text
126
printHashBytes32 c = T.pack $ concatMap char32 [nChar - 1, nChar - 2 .. 0]
127
where
128
-- The base32 encoding is 8/5's as long as the base256 digest
129
- nChar = fromIntegral $ BS.length c * 8 `div` 5
+ nChar = fromIntegral $ ((BS.length c * 8 - 1) `div` 5) + 1
130
131
char32 :: Integer -> [Char]
132
char32 i = [digits32 V.! digitInd]
0 commit comments