tree checksum vpatch file split hunks

all signers: phf bvt

antecedents: vtools_vpatch vtools_tempfile_standalone_notmp

press order:

vtools_genesisphf
vdiff_fixes_newline_gccphf
keccakphf
vdiff_keccakphf
vtools_fixes_bitrate_char_arrayphf
vtools_vpatchphf
vtools_fixes_static_tohexphf
vtools_vpatch_newlinephf
vtools_ksumphf
vtools_tempfile_standalone_notmpbvt phf
vdiff_blockwise_read-2bvt

patch:

- 6E0728447DD05A8E1D4DD21A9647AC87E1E66B16E1CB15DCA1A9E775907767FCAE8B4DB6BE152ABA863BEE3BF15CFB665512A45F001593BFD990B43E4087D3EF
+ 1F6A6754F578117A08BC3B4428801C6DBCFD04E5266DE39188DC9401ED1B2CF0D33D41A47FB37480CCAE92E3A5D4ADDE71B398F538A6D1E92EFFB23801B584D8
vtools/manifest
(8 . 3)(8 . 4)
5 517100 phf vtools_vpatch_newline Vpatch tool support for "No newline at end of file" directive.
6 543200 phf vtools_ksum Ksum standalone keccak hasher
7 547300 bvt vtools_tempfile_standalone_notmp Standalone temporary file generation code; creates temporary files in the vpatch work directory.
8 584341 bvt vdiff_blockwise_read Fix stack overflow in vdiff when hashing large files.
- 8B4ED2ECAE1C6FEE1CC25F280351F57E4329D048617754F580CCC2DF61734EDE8D64D26DFF20F29810A345B3E376ED6455F78E792EB02AF14D1E5C6C757771FD
+ 130484EDCB794A78DB04EEB6293A21EF5EA70AC04C55A7641E67FAC4879935FB1A51624081D583AE47BC30948610EAA6A3D6639CE53D0BE53D7F315406D22E9A
vtools/src/keccak_c.adb
(18 . 20)(18 . 30)
13 procedure C_Hash(Ctx: in C_Context_Access;
14 Input: Char_Star;
15 Len: Interfaces.C.size_t) is
16 Buffer_Size: constant Natural := 2048;
17 Byte_Size: constant Natural := 8;
18 N: Natural := 0;
19 I: Natural := 0;
20 L: Natural := Natural(Len);
21 S: String(1..L);
22 B: Bitstream(1..S'Length*8);
23 Buf: String(1..Buffer_Size);
24 B: Bitstream(1..Buf'Length*Byte_Size);
25 Ptr: Char_Star := Input;
26 begin
27 if Input = null then
28 raise Strings.Dereference_Error;
29 end if;
30 for Chr of S loop
31 Chr := Character(Ptr.all);
32 Char_Ptrs.Increment(Ptr);
33 while L > I loop
34 N := 0;
35 for Chr of Buf loop
36 exit when L <= I;
37 Chr := Character(Ptr.all);
38 Char_Ptrs.Increment(Ptr);
39 N := N + 1;
40 I := I + 1;
41 end loop;
42 ToBitstream(Buf(1..N), B(1..N*Byte_Size));
43 KeccakHash(Ctx.all, B(1..N*Byte_Size));
44 end loop;
45 ToBitstream(S, B);
46 KeccakHash(Ctx.all, B);
47 end C_Hash;
48
49 procedure C_End(Ctx: C_Context_Access;