mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:27:34 +00:00
Kernel: Harvest randomness from various drivers
Random now gets entropy from the following drivers: - KeyboardDevice - PATAChannel - PS2MouseDevice - E1000NetworkAdapter - RTL8139NetworkAdapter Of these devices, PS2MouseDevice and PATAChannel provide the vast majority of the entropy.
This commit is contained in:
parent
2e8cfe5435
commit
af0b2d1d86
12 changed files with 71 additions and 7 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
#include <Kernel/Interrupts/IRQHandler.h>
|
||||
#include <Kernel/KeyCode.h>
|
||||
#include <Kernel/Random.h>
|
||||
#include <LibKeyboard/CharacterMap.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -82,6 +83,7 @@ private:
|
|||
bool m_caps_lock_on { false };
|
||||
bool m_num_lock_on { false };
|
||||
bool m_has_e0_prefix { false };
|
||||
EntropySource m_entropy_source;
|
||||
|
||||
Keyboard::CharacterMap m_character_map = Keyboard::CharacterMap("en");
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue