module Week11 where import RSA test :: Integer -> Integer test plainText = modExp plainText b n where b = 8 n = 13 -- cracks the hash function -- given in lectures crack :: Integer -> Integer -> Integer -> Integer crack hash b n = modExp hash decrypt n where decrypt = inverse b m myFlip :: (a -> b -> c) -> (b -> a -> c) myFlip f x y = f y x sunim :: Int -> Int -> Int sunim = myFlip (-) plus :: Int -> Int -> Int plus x y = x + y plusFive :: Int -> Int plusFive x = x + 5