- BE61934D440DAD950D4F63EA9A1BB941A7994C832ADB4748A1E24083887853FDD52FDF024D940740A9D3B65759AAD66A05F42B0365624B0AFFA0E12418E2FE8D
+ 8B32DFA8A36C4CB27171B299D329919B9CD3677DE408D9474768641CF8FC1A4F60C236E6AA3005AA50B9379BBB78A06B214B38345E2D6255452E46F529AFDB71
smg_comms/src/raw_types.ads
(9 . 13)(9 . 14)
128 with Ada.Unchecked_Conversion;
129
130 package Raw_Types is
131 -- no side effects or internal state
132 Pragma Pure(Raw_Types);
133
134 -- constants from SMG.COMMS standard specification
135 -- size of a serpent-encrypted packet and message, in octets
136 -- note that this corresponds to 1472/16 = 92 Serpent blocks
137 -- NB: lengths are the same but the distinction makes the code clearer
138 SERPENT_PKT_OCTETS : constant Positive := 1472;
139 SERPENT_MSG_OCTETS : constant Positive := SERPENT_PKT_OCTETS;
140 -- NB: lengths are the same!
141 SERPENT_OCTETS : constant Positive := 1472;
142
143 -- size of a RSA-encrypted packet and message in octets and bits
144 RSA_PKT_OCTETS : constant Positive := 1470;
(38 . 8)(39 . 8)
146
147 -- Serpent packets and contained raw messages
148 -- NB: length is the same but the distinction makes the code clearer
149 subtype Serpent_Pkt is Octets( 1 .. SERPENT_PKT_OCTETS );
150 subtype Serpent_Msg is Octets( 1 .. SERPENT_MSG_OCTETS );
151 subtype Serpent_Pkt is Octets( 1 .. SERPENT_OCTETS );
152 subtype Serpent_Msg is Octets( 1 .. SERPENT_OCTETS );
153
154 -- blind, unchecked casts ( memcpy style )
155 function Cast is new Ada.Unchecked_Conversion( Integer_8 , Octets_1 );