smg_comms_rsa_oaep 1
smg_comms_rsa_oaep 2
smg_comms_rsa_oaep 3 with Ada.Exceptions; use Ada.Exceptions;
smg_comms_rsa_oaep 4
smg_comms_rsa_oaep 5 package body RNG is
smg_comms_rsa_oaep 6
smg_comms_rsa_oaep 7 procedure Get_Octets( O: out Raw_Types.Octets ) is
smg_comms_rsa_oaep 8 F : Octet_IO.File_Type;
smg_comms_rsa_oaep 9 begin
smg_comms_rsa_oaep 10 begin
smg_comms_rsa_oaep 11 Octet_IO.Open( File => F, Mode => Octet_IO.In_File, Name => RNG_PATH );
smg_comms_rsa_oaep 12 for I in O'Range loop
smg_comms_rsa_oaep 13 Octet_IO.Read( F, O(I) );
smg_comms_rsa_oaep 14 end loop;
smg_comms_rsa_oaep 15 Octet_IO.Close(F);
smg_comms_rsa_oaep 16 exception
smg_comms_rsa_oaep 17 when others => Raise_Exception(FG_Failure'Identity,
smg_comms_rsa_oaep 18 "Failed to access default RNG source!");
smg_comms_rsa_oaep 19 end;
smg_comms_rsa_oaep 20 end Get_Octets;
smg_comms_rsa_oaep 21
smg_comms_rsa_oaep 22 end RNG;