Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions botan-low/test/Botan/Low/MPISpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,15 @@ main = hspec $ do
r `shouldBe` 64
pass
it "can compute the modular inverse" $ do
r <- mpInit
result <- mpInit
x <- mpInit
mpSetFromInt x 512
mpSetFromInt x 29
mod <- mpInit
mpSetFromInt mod 29
mpModInverse r x mod
-- TODO: Actually check more than just being bound
mpSetFromInt mod 65535
-- x needs to be smaller than mod
mpModInverse result x mod
r <- mpToWord32 result
r `shouldBe` 13559
pass
it "can generate a number of random bits" $ do
mp <- mpInit
Expand Down
Loading