git.iko.soy/typeable/entropy
on main help sign in
Guard another use of RDRAND
a605127Thomas M. DuBuisson
System/EntropyNix.hs+2
@@ -59,7 +59,9 @@ openHandle = do
59-- |Close the `CryptHandle`
59-- |Close the `CryptHandle`
60closeHandle :: CryptHandle -> IO ()
60closeHandle :: CryptHandle -> IO ()
61closeHandle (CH h) = closeFd h
61closeHandle (CH h) = closeFd h
62+#ifdef HAVE_RDRAND
62closeHandle (UseRdRand h) = closeFd h
63closeHandle (UseRdRand h) = closeFd h
64+#endif
63
65
64-- |Read random data from a `CryptHandle`
66-- |Read random data from a `CryptHandle`
65hGetEntropy :: CryptHandle -> Int -> IO B.ByteString
67hGetEntropy :: CryptHandle -> Int -> IO B.ByteString