-
+ ED853E32EBD9E0C93A01EF12EB5BF7E6765D841A4A8E67FF72B4EC69228985D8429F68B7727387F78D8E83BD8248C7724BFAA54495DD19DA068979560A3610D4
smg_comms/src/rng.ads
(0 . 0)(1 . 22)
1117 -- True Random octets generator reading from an FG and using Raw_Types.
1118 -- S.MG, 2018
1119
1120 with Ada.Sequential_IO;
1121 with Interfaces;
1122 with Raw_Types;
1123
1124 package RNG is
1125
1126 -- for reading from the FG one Octet at a time
1127 package Octet_IO is new Ada.Sequential_IO(Element_Type =>
1128 Interfaces.Unsigned_8);
1129
1130 -- path to the FG; NB: the FG has to be initialized prior to using SMG Comms!
1131 RNG_PATH: constant String := "/dev/ttyUSB0";
1132
1133 -- exception raised when FG is not accessible / read fails
1134 FG_Failure : exception;
1135
1136 -- reads O'Length octets from the FG at RNG_PATH
1137 procedure Get_Octets( O: out Raw_Types.Octets );
1138 end RNG;