eucrypt_crc32_div... 1
eucrypt_crc32_div... 2
eucrypt_crc32_div... 3
eucrypt_crc32_div... 4
eucrypt_crc32_div... 5
eucrypt_crc32_div... 6
eucrypt_crc32_div... 7
eucrypt_crc32_div... 8
eucrypt_crc32_div... 9
eucrypt_crc32_div... 10
eucrypt_crc32_div... 11
eucrypt_crc32_div... 12
eucrypt_crc32_div... 13
eucrypt_crc32_div... 14
eucrypt_crc32_div... 15
eucrypt_crc32_div... 16
eucrypt_crc32_div... 17
eucrypt_crc32_div... 18
eucrypt_crc32_div... 19
eucrypt_crc32_div... 20 with Ada.Text_IO; use Ada.Text_IO;
eucrypt_crc32_div... 21 with Interfaces; use Interfaces;
eucrypt_crc32_div... 22 with CRC32;
eucrypt_crc32_div... 23
eucrypt_crc32_div... 24 procedure Test_CRC32 is
eucrypt_crc32_div... 25 Input : constant String := "123456789";
eucrypt_crc32_div... 26 Expected : constant Unsigned_32 := 16#CBF4_3926#;
eucrypt_crc32_div... 27 Output : Unsigned_32;
eucrypt_crc32_div... 28 begin
eucrypt_crc32_div... 29 Output := CRC32.CRC(Input);
eucrypt_crc32_div... 30 if Output /= Expected then
eucrypt_crc32_div... 31 Put_Line("FAIL: CRC32(" & Input & ") returned " &
eucrypt_crc32_div... 32 Unsigned_32'Image(Output) & " instead of " &
eucrypt_crc32_div... 33 Unsigned_32'Image(Expected));
eucrypt_crc32_div... 34 else
eucrypt_crc32_div... 35 Put_Line("PASS: CRC32(" & Input & ") returned " &
eucrypt_crc32_div... 36 Unsigned_32'Image(Output) & " as expected.");
eucrypt_crc32_div... 37 end if;
eucrypt_crc32_div... 38
eucrypt_crc32_div... 39 end Test_CRC32;