git.iko.soy/typeable/entropy
on main help sign in
Guard another use of RDRAND
commita60512781cecd6777802f1048bc5feed1ad3ae42 authorThomas M. DuBuisson <tommd@galois.com> dateWed 16 Jul 2014, 13:31 (12 years ago) parentad144b1
1 file changed+2
System/EntropyNix.hs+2
System/EntropyNix.hs+2
@@ -59,7 +59,9 @@ openHandle = do
5959-- |Close the `CryptHandle`
6060closeHandle :: CryptHandle -> IO ()
6161closeHandle (CH h) = closeFd h
62+#ifdef HAVE_RDRAND
6263closeHandle (UseRdRand h) = closeFd h
64+#endif
6365
6466-- |Read random data from a `CryptHandle`
6567hGetEntropy :: CryptHandle -> Int -> IO B.ByteString