
6 Feb
2022
6 Feb
'22
7:02 p.m.
Hello Otto, Il 06 febbraio 2022 alle 19:00 Torsten Otto ha scritto:
When I call
*Main> diffieH 23 16 20 13
and use the result in
*Main> encipher "abc" 13 „nop"
I get the letters to be expected. However, when I combine these into
start text p a b = encipher text (diffieH p a b)
*Main> start "abc" 23 16 20 „efg"
the result changes.
You should always write top level signatures by hand in your code. What is the signature that you want for `diffieH`? This is the inferred one λ> :t diffieH diffieH :: (Integral a, Integral b) => a -> b -> a -> a