-- True Random octets generator reading from an FG and using Raw_Types. -- S.MG, 2018 with Ada.Sequential_IO; with Interfaces; with Raw_Types; package RNG is -- for reading from the FG one Octet at a time package Octet_IO is new Ada.Sequential_IO(Element_Type => Interfaces.Unsigned_8); -- path to the FG; NB: the FG has to be initialized prior to using SMG Comms! RNG_PATH: constant String := "/dev/ttyUSB0"; -- exception raised when FG is not accessible / read fails FG_Failure : exception; -- reads O'Length octets from the FG at RNG_PATH procedure Get_Octets( O: out Raw_Types.Octets ); end RNG;