úÎ'¯Thomas.DuBuisson@gmail.combetaportableNoneV=%Handle for manual resource managementeGet random values from the hardward RNG or return Nothing if no supported hardware RNG is available.:Supported hardware: * RDRAND * Patches welcomeOpen a  Close the Read random data from a Thomas.DuBuisson@gmail.combetaportableNoneVy«Get a specific number of bytes of cryptographically secure random data using the *system-specific* sources. (As of 0.4. Verions <0.4 mixed system and hardware sources)VThe returned random value is considered cryptographically secure but not true entropy.gOn some platforms this requies a file handle which can lead to resource exhaustion in some situations.zGet a specific number of bytes of cryptographically secure random data using a supported *hardware* random bit generator.5If there is no hardware random number generator then NothingG is returned. If any call returns non-Nothing then it should never be Nothing+ unless there has been a hardware failure.‰If trust of the CPU allows it and no context switching is important, a bias to the hardware rng with system rng as fall back is trivial: Ilet fastRandom nr = maybe (getEntropy nr) pure =<< getHardwareEntropy nr  The old, <0.4, behavior is possible using xor from : "let oldRandom nr = do hwRnd  -#maybe (replicate nr 0) BS.unpack <$& getHardwareEntropy nr sysRnd  - BS.unpack <$A getEntropy nr pure $ BS.pack $ zipWith xor sysRnd hwRnd 8A less maliable mixing can be accomplished by replacing xor6 with a composition of concat and cryptographic hash.Number of bytesNumber of bytes    !entropy-0.4-7QKVC6xQkG2C86CkQfbJSSystem.EntropySystem.EntropyNixDataBits CryptHandle openHandle closeHandle hGetEntropy getEntropygetHardwareEntropyhardwareRandomCH